Cache
lexer cache — where the parsed AST is kept and when it goes stale.
lexer cache info [--dir path]
lexer cache list [--dir path]
lexer cache clear [--dir path]What is stored#
What is stored is the parsed AST — not compiler output. LexerLang is not compiled; the cache only removes the cost of parsing the same file again on every request.
lexer cache info --dir .When it goes stale#
Validity is decided from the file's modification time and size. If either changed, the file is parsed again.
That is cheaper than hashing the contents, but it has a limit: if you change a file and then set its mtime back to an older value — with touch -t, or a copy that preserves mtime — the cache keeps using the stale AST.
lexer cache clear --dir .Where it lives#
Under the directory given with --dir, in .lexer/cache. The default is the application's working directory.
That matters for a service running under systemd: the service needs write access to that directory.
# in the systemd unit
ReadWritePaths=/var/www/applicationWithout permission the server still runs, but it reparses on every request.
Next#
Syntax — the shape of the language.