ReservedWords class

ReservedWords class it will keep collection of all reserved words including keywords and provides a function to check if input is a reserved word

Constructors

ReservedWords()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

userReservedWords Map<String, Set<String>>
additional reserved words to be used by user just add reserved words in top level function once and use it anywhere in any instance of AnySyntaxHighlighter for example using html elements as reserved words:- void main(){ ReservedWords.userReservedWords['html'] = { 'html', 'div', 'body', 'head'} } Now use it anywhere by using:- AnySyntaxHighlighter( '<html>\n<head>\n</head>\n<body>\n<body>\n</html>', reservedWordSets: const ['html'], )
getter/setter pair

Static Methods

exists(String key) bool
check if a key exists in reserved words map, return true if exists otherwise false for ex ReservedWords.exists('java') will return true
isReservedWord(Set<String> keySet, String value) bool
function to check if input is a reserved word