parse

actual external fun parse(source: String, 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 cancelled due to a timeout.


actual external fun parse(oldTree: Tree?, callback: ParseCallback): 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 cancelled due to a timeout.

expect fun parse(source: String, 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 cancelled due to a timeout.


expect fun parse(oldTree: Tree? = null, callback: ParseCallback): 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 cancelled due to a timeout.

actual external fun parse(source: String, 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 cancelled due to a timeout.


actual external fun parse(oldTree: Tree?, callback: ParseCallback): 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 cancelled due to a timeout.

actual fun parse(source: String, 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 canceled due to a timeout.


actual fun parse(oldTree: Tree?, callback: ParseCallback): 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 cancelled due to a timeout.