You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new Char Token Enum should be created leo/parser/src/tokenizer/token.rs. This should go under the commented Types section.
A new CharLit Token Enum should be created leo/parser/src/tokenizer/token.rs. This should go under the commented Types section.
Parser Side
In parse_primary_expression should match on Token::CharLit and then parse the character to a AST Node ValueExpression leo/parser/src/parser/expression.rs.
Tests
Parser Tests:
Escaped Characters.
Hex Characters(although I suppose these could be grouped with the prior).
Valid Regular Characters.
Invalid Character Syntax.
The text was updated successfully, but these errors were encountered:
馃殌 Feature
The goal is to add
char
as a Token and for it to be parsable to AST nodes.Depends on #939.
Motivation
This helps the implementation goal of #929.
Implementation
Tokenizer Side
Char Token
Enum should be createdleo/parser/src/tokenizer/token.rs
. This should go under the commented Types section.CharLit Token
Enum should be createdleo/parser/src/tokenizer/token.rs
. This should go under the commented Types section.Parser Side
parse_primary_expression
should match onToken::CharLit
and then parse the character to a AST Node ValueExpressionleo/parser/src/parser/expression.rs
.Tests
The text was updated successfully, but these errors were encountered: