forked from AbleScript/ablescript
Added emoji support for identifiers
This commit is contained in:
parent
5c0e89e38e
commit
167a5077df
|
@ -104,7 +104,7 @@ pub enum Token {
|
||||||
/// Run at the end of the program
|
/// Run at the end of the program
|
||||||
#[token("finally")]
|
#[token("finally")]
|
||||||
Finally,
|
Finally,
|
||||||
|
|
||||||
/// Crash with random error (see discussion #17)
|
/// Crash with random error (see discussion #17)
|
||||||
#[token("rlyeh")]
|
#[token("rlyeh")]
|
||||||
Rlyeh,
|
Rlyeh,
|
||||||
|
@ -126,7 +126,7 @@ pub enum Token {
|
||||||
Char(char),
|
Char(char),
|
||||||
|
|
||||||
/// An identifier
|
/// An identifier
|
||||||
#[regex(r"\p{XID_Start}[\p{XID_Continue}]+", get_ident)]
|
#[regex(r"[\p{XID_Start}|\p{Emoji}][\p{XID_Continue}|\p{Emoji}]+", get_ident)]
|
||||||
#[token("and ", |_| "and".to_owned())]
|
#[token("and ", |_| "and".to_owned())]
|
||||||
Identifier(String),
|
Identifier(String),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue