huff_neo_utils/lexer_context.rs
1/// Defines a context in which the lexing happens.
2/// Allows to differentiate between EVM types and opcodes that can either
3/// be identical or the latter being a substring of the former (example : bytes32 and byte)
4#[derive(Debug, Clone, PartialEq, Eq)]
5pub enum Context {
6 /// global context
7 Global,
8 /// Macro definition context
9 MacroDefinition,
10 /// Macro's body context
11 MacroBody,
12 /// Macro's argument context (definition or being called)
13 MacroArgs,
14 /// ABI context
15 Abi,
16 /// Lexing args of functions inputs/outputs and events
17 AbiArgs,
18 /// constant context
19 Constant,
20 /// Code table context
21 CodeTableBody,
22 /// Built-in function context
23 BuiltinFunction,
24 /// For loop body context
25 ForLoopBody,
26 /// Test decorator context, from `#[` to its matching `]`
27 Decorator,
28}