Reserve begin/end.
This commit is contained in:
13
src/token.rs
13
src/token.rs
@@ -532,11 +532,10 @@ impl Token {
|
||||
"import" | "export" | "as" => Reserved(syntax.into()),
|
||||
|
||||
"===" | "!==" | "->" | "<-" | ":=" | "::<" | "(*" | "*)" | "#" | "public" | "new"
|
||||
| "use" | "module" | "package" | "var" | "static" | "shared" | "with" | "each"
|
||||
| "then" | "goto" | "unless" | "exit" | "match" | "case" | "default" | "void"
|
||||
| "null" | "nil" | "spawn" | "thread" | "go" | "sync" | "async" | "await" | "yield" => {
|
||||
Reserved(syntax.into())
|
||||
}
|
||||
| "use" | "module" | "package" | "var" | "static" | "begin" | "end" | "shared"
|
||||
| "with" | "each" | "then" | "goto" | "unless" | "exit" | "match" | "case"
|
||||
| "default" | "void" | "null" | "nil" | "spawn" | "thread" | "go" | "sync"
|
||||
| "async" | "await" | "yield" => Reserved(syntax.into()),
|
||||
|
||||
KEYWORD_PRINT | KEYWORD_DEBUG | KEYWORD_TYPE_OF | KEYWORD_EVAL | KEYWORD_FN_PTR
|
||||
| KEYWORD_FN_PTR_CALL | KEYWORD_FN_PTR_CURRY | KEYWORD_IS_DEF_VAR
|
||||
@@ -1670,12 +1669,12 @@ impl<'a> Iterator for TokenIterator<'a, '_> {
|
||||
"'<-' is not a valid symbol. This is not Go! Should it be '<='?".to_string(),
|
||||
)),
|
||||
(":=", false) => Token::LexError(LERR::ImproperSymbol(s,
|
||||
"':=' is not a valid assignment operator. This is not Go! Should it be simply '='?".to_string(),
|
||||
"':=' is not a valid assignment operator. This is not Go or Pascal! Should it be simply '='?".to_string(),
|
||||
)),
|
||||
("::<", false) => Token::LexError(LERR::ImproperSymbol(s,
|
||||
"'::<>' is not a valid symbol. This is not Rust! Should it be '::'?".to_string(),
|
||||
)),
|
||||
("(*", false) | ("*)", false) => Token::LexError(LERR::ImproperSymbol(s,
|
||||
("(*", false) | ("*)", false) | ("begin", false) | ("end", false) => Token::LexError(LERR::ImproperSymbol(s,
|
||||
"'(* .. *)' is not a valid comment format. This is not Pascal! Should it be '/* .. */'?".to_string(),
|
||||
)),
|
||||
("#", false) => Token::LexError(LERR::ImproperSymbol(s,
|
||||
|
Reference in New Issue
Block a user