<abstract> new Lit(name)
Creates a literal symbol; should only be used by factory method. Extracts value from representation.
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | (quoted) representation for the literal.
Empty string is reserved for |
- Source:
Properties:
| Name | Type | Argument | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
value |
string | (unquoted) value for the literal; empty string for |
|||||||||||||
screened |
boolean |
<optional> |
set true only during scanner construction if literal value matches a token pattern. |
||||||||||||
prec |
Object | precedence. Properties
|
|||||||||||||
used |
boolean | true if used in a grammar. |
|||||||||||||
name |
string | name for a token, representation for a literal. |
Extends
Methods
-
dump()
-
Displays description and precedence, if any.
- Inherited From:
- Overrides:
- Source:
Returns:
- Type
- string
-
toString()
-
Displays representation of a literal or
$eof.Returns:
- Type
- string
-
unescape(s)
-
Removes leading and trailing delimiter character and elaboarates backslash escapes.
Parameters:
Name Type Description sstring string to unescape.
Returns:
unquoted, unescaped string.
- Type
- string