72 std::vector<ncnt>& getIndents();
80 template <
typename T>
void setScan() { _mode = &T::instance; }
98 using stelaTokenScanable::onScan;
208 nbool _isIgnoreWhitespace;
210 std::vector<ncnt> _indents;
212 std::vector<nint> _states;
214 std::vector<std::string> _errs;
Core AST node for stela configuration language.
Definition stela.hpp:49
Parser for stela configuration language.
Definition stelaParser.hpp:39
void setScan()
Sets the scanning mode for the lexer.
Definition stelaParser.hpp:80
nint onScan(stelaParser &ps, ZZSTYPE *val, ZZLTYPE *loc, zzscan_t scanner, nbool &isBypass) override
Handles scanning for the lexer, overriding the base stelaTokenScanable behavior.
nint onIndent(ncnt col, nint tok)
Handles an increase in indentation.
tstr< stela > parseFromFile(const std::string &path)
Parses stela code from the specified file path.
int popState()
Pops a Flex scanner state from the state stack.
int pushState(int newState)
Pushes a new Flex scanner state onto the state stack.
nint onTokenComma(nint tok)
Handles the comma token.
void onParseErr(const std::string &msg, const nchar *symbolName)
Handles a parse error, reporting the message and the symbol where the error occurred.
nint onTokenColon(nint tok)
Handles the colon token.
tstr< stela > parseFromFile(const nchar *path)
Parses stela code from the specified C-style file path.
tstr< stela > parse(const nchar *codes)
Parses the given C-style string of stela code.
tstr< stela > parse(const std::string &codes)
Parses the given string of stela code.
nchar onScanUnexpected(const nchar *token)
Handles an unexpected token encountered during scanning.
nint onIgnoreIndent(nint tok)
Handles ignoring indentation (e.g., for inline blocks).
stela * onPrimitive(const T &arg)
Creates a valStela object from a primitive value.
Definition stelaParser.hpp:173
void report(const std::string &msg)
Reports a message, typically an error or warning, encountered during parsing.
nint onTokenNewLine(nint tok)
Handles the newline token.
nint onTokenEndOfFile()
Handles the end-of-file token.
nint onDedent(ncnt col, nint tok)
Handles a decrease in indentation.
Smart dedent handler for indentation-based parsing.
Definition stelaSmartDedent.hpp:25
Token dispatcher for managing token queue during parsing.
Definition stelaTokenDispatcher.hpp:14
Base class for token scanning strategies.
Definition stelaTokenScan.hpp:30
Interface for token scanning during stela parsing.
Definition stelaTokenScanable.hpp:19
Value stela node for storing primitive values.
Definition valStela.hpp:17
Version stela node for semantic version handling.
Definition verStela.hpp:17
Rich logging support with polymorphic type conversion.
Definition richLog.hpp:34