LuaStringParser class
A PetitParser-based parser for Lua string literals that handles escape sequences correctly
Constructors
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 Methods
-
build(
{bool sourceCodeUnitsAreBytes = false}) → Parser< List< int> > -
decodeUtf8Character(
List< int> bytes, int start, {bool lax = false}) → Utf8DecodeResult? -
Decodes one UTF-8 character starting at byte position
start. Returnsnullif the sequence is invalid (unlesslaxis true). -
encodeCodePoint(
int codePoint) → List< int> -
Encodes a single Unicode
codePointto UTF-8 bytes. Supports the historical 5- and 6-byte forms that Lua still recognises for code points up to 0x7FFFFFFF. -
parseStringContent(
String content, {bool sourceCodeUnitsAreBytes = false}) → List< int> - Parse a Lua string literal content and return the resulting bytes