parse

actual external fun parse(source: String, encoding: InputEncoding, oldTree: Tree?): Tree(source)

Parse a source code string and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.


actual external fun parse(encoding: InputEncoding, oldTree: Tree?, progressCallback: ParseProgressCallback?, readCallback: ParseReadCallback): Tree(source)

Parse source code from a callback and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.

expect fun parse(source: String, encoding: InputEncoding = InputEncoding.UTF_8, oldTree: Tree? = null): Tree(source)

Parse a source code string and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.


expect fun parse(encoding: InputEncoding = InputEncoding.UTF_8, oldTree: Tree? = null, progressCallback: ParseProgressCallback? = null, readCallback: ParseReadCallback): Tree(source)

Parse source code from a callback and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.

actual external fun parse(source: String, encoding: InputEncoding, oldTree: Tree?): Tree(source)

Parse a source code string and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.


actual external fun parse(encoding: InputEncoding, oldTree: Tree?, progressCallback: ParseProgressCallback?, readCallback: ParseReadCallback): Tree(source)

Parse source code from a callback and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.

actual fun parse(source: String, encoding: InputEncoding, oldTree: Tree?): Tree(source)

Parse a source code string and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.


actual fun parse(encoding: InputEncoding, oldTree: Tree?, progressCallback: ParseProgressCallback?, readCallback: ParseReadCallback): Tree(source)

Parse source code from a callback and create a syntax tree.

If you have already parsed an earlier version of this document and the document has since been edited, pass the previous syntax tree to oldTree so that the unchanged parts of it can be reused. This will save time and memory. For this to work correctly, you must have already edited the old syntax tree using the Tree.edit method in a way that exactly matches the source code changes.

Throws

If the parser does not have a language assigned or if parsing was halted.