Given a list of Suggestion entries, and a list of keys and the preferred separator to use, returns a list of Completion entries.
It takes care of escaping for keys if needed, but not note contents since a custom consume function can be defined and we would not know what to escape.
Given the input string and a Completion consisting of the value of the replacement and a Suggestion entry, returns the replacement string and the new position of the cursor.
The value passed should be escaped if it's needed. autocomplete already takes care of this if you're using it.
Returns a list of suggestions ( Suggestion ). These are not a list of autocomplete entries (with values), but more a list of entries describing possible suggestions. This list can then be passed to Parser.autocomplete to build a list to show users, from which you can then pick an entry to pass to Parser.autoreplace .
The list returned is "unsorted", but there is still some logic to the order. Fixes for errors are suggested first, in the order returned by getSurroundingErrors. Regular suggestions come after.
Parses a string.
Allows pre-validating ASTs for syntax highlighting purposes.
Works similar to evaluate. Internally it will use the tokenValidator option.
Generated using TypeDoc
Creates the main parser class which handles all functionality (evaluation, validation, etc).