tiny.chant.lexer
Defined in tiny.chant.
API (10)
Actions
Public operations.
Types and contracts
Public types and contracts.
CapacityCapacityErrorErrorExhaustionLexerLimitsStorageSurvey: The result of a counting pass (survey) over one source: how many tokens the source holds, counting the end-of-file token, and the address and length of both the source text and the file name.
Source
Source: lib/chant/src/lexer/error.zig:1
zig
pub const Error = error{ UnexpectedCharacter, UnterminatedString, UnterminatedCharacter, UnterminatedComment,};Source: lib/chant/src/lexer/scan.zig:11
zig
pub fn next(self: anytype) Error!Token { try trivia.skip(self); const start = self.index; const column: u32 = @intCast(self.index - self.line_start + 1); if (self.index >= self.source.len) { return .{ .kind = .eof, .text = self.source[start..self.index], .file = self.file, .line = self.line, .column = column, }; } if (try literal.lex(self, start, column)) |tok| return tok; if (identifier.lex(self, start, column)) |tok| return tok; if (number.lex(self, start, column)) |tok| return tok; return punctuator.lex(self, start, column);}Source: lib/chant/src/lexer/root.zig
zig
const scan = @import("scan.zig");const state = @import("state.zig");const stream = @import("stream.zig");pub const Error = @import("error.zig").Error;pub const Lexer = state.Lexer;pub const Limits = stream.Limits;pub const Capacity = stream.Capacity;pub const CapacityError = stream.CapacityError;pub const Storage = stream.Storage;pub const Survey = stream.Survey;pub const Exhaustion = stream.Exhaustion;pub const next = scan.next;pub const survey = stream.survey;Source: lib/chant/src/root.zig:60
zig
pub const lexer = @import("lexer/root.zig");Complete caller list for lexer.next
7 direct callers.
tiny.chant.TokenStorage.fill[method] atlib/chant/src/lexer/stream.zig:152tiny.chant.lexer.survey[function] atlib/chant/src/lexer/stream.zig:191lib.chant.src.lexer.stream.test_token_survey_and_fill_match_direct_lexing[function] — test source atlib/chant/src/lexer/stream.zig:410in nearest public ownerlib.chant.src.lexer.streamtiny.sql.diff.Scan.next[method] atlib/sql/src/diff.zig:80tiny.sql.StatementCursor.nextRowid[method] atlib/sql/src/statement/cursor.zig:107tiny.sql.StatementCursor.nextScan[method] atlib/sql/src/statement/cursor.zig:170lib.sql.src.tree.expectScanEntries[function] — private source atlib/sql/src/tree.zig:4096in nearest public ownertiny.sql.tree
Audit
| Definitions | 3 |
|---|---|
| Public names | 3 |
| Members | 4 |
| Version | 26.7.0 |
| Revision | daab053ee433 |