compile function

void compile(
  1. String source,
  2. IOSink out, {
  3. String? sourceName,
  4. String? destinationName,
  5. Encoding encoding = utf8,
  6. bool verbose = false,
  7. bool lineNumber = false,
  8. List<String>? imports,
})

Compiles the given source RSP document to the given output stream out. Notice that the caller has to close the output stream by himself.

  • imports - additional imported packages, such as ["package:foo/foo.dart"].

Implementation

void compile(String source, IOSink out, {
    String? sourceName, String? destinationName,
    Encoding encoding = utf8, bool verbose = false, bool lineNumber = false,
    List<String>? imports}) {
  Compiler(source, out, sourceName: sourceName, destinationName: destinationName,
      encoding: encoding, verbose: verbose, lineNumber: lineNumber, imports: imports)
  .compile();
}