tiny.chant.parse.state.memory
Defined in parse.state.
API (5)
Actions
Public operations.
Source
Source: lib/chant/src/parse/state/memory.zig
zig
const ast = @import("../../ast/root.zig");const origin = @import("origin.zig");const types = @import("types.zig");const Error = @import("../root.zig").Error;const Parser = types.Parser;pub fn create(parser: *Parser, comptime T: type, value: T) Error!*T { if (T == ast.Expr) return parser.nodes.createExpr(value); if (T == ast.Stmt) return parser.nodes.createStmt(value); if (T == ast.Type) { @compileError("use createType with an explicit token charge"); } @compileError("parser node storage does not cover " ++ @typeName(T));}pub fn createExprAt( parser: *Parser, value: ast.Expr, token_index: usize,) Error!*ast.Expr { return parser.nodes.createExprAt(value, token_index);}pub fn createType( parser: *Parser, value: ast.Type, placement: origin.TypePlacement,) Error!*ast.Type { return parser.nodes.createType(value, placement);}pub fn directType( token_index: usize, secondary_index: ?usize,) origin.TypePlacement { return .{ .charged = token_index, .origin = .{ .primary = token_index, .secondary = secondary_index orelse origin.no_token, }, };}pub fn derivedType( type_origin: origin.TypeOrigin, secondary: bool,) origin.TypePlacement { return .{ .charged = if (secondary) type_origin.secondary else type_origin.primary, .origin = type_origin, };}Source: lib/chant/src/parse/state/root.zig:6
zig
pub const memory = @import("memory.zig");Complete caller list for parse.state.memory.create
19 direct callers.
lib.chant.src.parse.expression.desugarIncrement[function] — private source atlib/chant/src/parse/expression.zig:174in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.integerConstantExpression[function] — private source atlib/chant/src/parse/expression.zig:179in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parseAlignof[function] — private source atlib/chant/src/parse/expression.zig:328in nearest public ownertiny.chant.parse.expressiontiny.chant.parse.expression.parseAssignment[function] atlib/chant/src/parse/expression.zig:21lib.chant.src.parse.expression.parseBinary[function] — private source atlib/chant/src/parse/expression.zig:89in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parseConditional[function] — private source atlib/chant/src/parse/expression.zig:42in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parsePostfixChain[function] — private source atlib/chant/src/parse/expression.zig:346in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parsePrimary[function] — private source atlib/chant/src/parse/expression.zig:369in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parseSizeof[function] — private source atlib/chant/src/parse/expression.zig:310in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parseUnary[function] — private source atlib/chant/src/parse/expression.zig:101in nearest public ownertiny.chant.parse.expressiontiny.chant.parse.initializer.parse[function] atlib/chant/src/parse/initializer.zig:12lib.chant.src.parse.statement.parseBlockItem[function] — private source atlib/chant/src/parse/statement.zig:72in nearest public ownerlib.chant.src.parse.statementlib.chant.src.parse.statement.parseCompound[function] — private source atlib/chant/src/parse/statement.zig:56in nearest public ownerlib.chant.src.parse.statementlib.chant.src.parse.statement.parseDo[function] — private source atlib/chant/src/parse/statement.zig:164in nearest public ownerlib.chant.src.parse.statementlib.chant.src.parse.statement.parseFor[function] — private source atlib/chant/src/parse/statement.zig:118in nearest public ownerlib.chant.src.parse.statementlib.chant.src.parse.statement.parseIf[function] — private source atlib/chant/src/parse/statement.zig:101in nearest public ownerlib.chant.src.parse.statementlib.chant.src.parse.statement.parseLabel[function] — private source atlib/chant/src/parse/statement.zig:91in nearest public ownerlib.chant.src.parse.statementtiny.chant.parse.parseStatement[function] atlib/chant/src/parse/statement.zig:17lib.chant.src.parse.statement.parseWhile[function] — private source atlib/chant/src/parse/statement.zig:155in nearest public ownerlib.chant.src.parse.statement
Complete caller list for parse.state.memory.createType
11 direct callers.
lib.chant.src.parse.auto.replace[function] — private source atlib/chant/src/parse/auto.zig:28in nearest public ownertiny.chant.parse.autolib.chant.src.parse.auto.test_auto_resolves_simple_and_pointer_declarations[function] — test source atlib/chant/src/parse/auto.zig:50in nearest public ownertiny.chant.parse.autolib.chant.src.parse.expression.makePointerType[function] — private source atlib/chant/src/parse/expression.zig:294in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parsePrimary[function] — private source atlib/chant/src/parse/expression.zig:369in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.initializer.completeArrayType[function] — private source atlib/chant/src/parse/initializer.zig:88in nearest public ownertiny.chant.parse.initializerlib.chant.src.parse.type.declarator.adjustParameterType[function] — private source atlib/chant/src/parse/type/declarator.zig:151in nearest public ownerlib.chant.src.parse.type.declaratorlib.chant.src.parse.type.declarator.parse[function] — private source atlib/chant/src/parse/type/declarator.zig:15in nearest public ownerlib.chant.src.parse.type.declaratorlib.chant.src.parse.type.declarator.parseSuffixes[function] — private source atlib/chant/src/parse/type/declarator.zig:72in nearest public ownerlib.chant.src.parse.type.declaratorlib.chant.src.parse.type.spec.parse[function] — private source atlib/chant/src/parse/type/spec.zig:48in nearest public ownerlib.chant.src.parse.type.speclib.chant.src.parse.type.spec.resolveEnumDefinition[function] — private source atlib/chant/src/parse/type/spec.zig:353in nearest public ownerlib.chant.src.parse.type.speclib.chant.src.parse.type.spec.resolveFixedEnumDeclaration[function] — private source atlib/chant/src/parse/type/spec.zig:401in nearest public ownerlib.chant.src.parse.type.spec
Complete caller list for parse.state.memory.directType
8 direct callers.
lib.chant.src.parse.auto.test_auto_resolves_simple_and_pointer_declarations[function] — test source atlib/chant/src/parse/auto.zig:50in nearest public ownertiny.chant.parse.autolib.chant.src.parse.expression.makePointerType[function] — private source atlib/chant/src/parse/expression.zig:294in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.expression.parsePrimary[function] — private source atlib/chant/src/parse/expression.zig:369in nearest public ownertiny.chant.parse.expressionlib.chant.src.parse.type.declarator.parse[function] — private source atlib/chant/src/parse/type/declarator.zig:15in nearest public ownerlib.chant.src.parse.type.declaratorlib.chant.src.parse.type.declarator.parseSuffixes[function] — private source atlib/chant/src/parse/type/declarator.zig:72in nearest public ownerlib.chant.src.parse.type.declaratorlib.chant.src.parse.type.spec.parse[function] — private source atlib/chant/src/parse/type/spec.zig:48in nearest public ownerlib.chant.src.parse.type.speclib.chant.src.parse.type.spec.resolveEnumDefinition[function] — private source atlib/chant/src/parse/type/spec.zig:353in nearest public ownerlib.chant.src.parse.type.speclib.chant.src.parse.type.spec.resolveFixedEnumDeclaration[function] — private source atlib/chant/src/parse/type/spec.zig:401in nearest public ownerlib.chant.src.parse.type.spec
Audit
| Definitions | 6 |
|---|---|
| Public names | 6 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |