MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / is_expr_start

Method is_expr_start

aiscript-lexer/src/lib.rs:189–208  ·  view source on GitHub ↗

Check if the token could start as an expression.

(&self)

Source from the content-addressed store, hash-verified

187
188 /// Check if the token could start as an expression.
189 pub fn is_expr_start(&self) -> bool {
190 // Exclude TokenType::OpenBrace to avoid syntax conflict with object literal.
191 matches!(
192 self.kind,
193 TokenType::Number
194 | TokenType::String
195 | TokenType::True
196 | TokenType::False
197 | TokenType::Nil
198 | TokenType::Identifier
199 | TokenType::OpenParen
200 | TokenType::OpenBracket
201 | TokenType::Match
202 | TokenType::Minus
203 | TokenType::Not
204 | TokenType::Self_
205 | TokenType::Super
206 | TokenType::Pipe
207 )
208 }
209}
210
211// Lexer for tokenizing source code

Callers 1

block_exprMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected