implement syntax errors inside zig parser code in ZON mode when illegal syntax is used #14532
Labels
bug
Observed behavior contradicts documented or intended behavior
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
standard library
This issue involves writing Zig code for the standard library.
Milestone
Extracted from #14523.
When the following function is used, compile errors should be detected when any syntax that is not legal in ZON is used.
zig/lib/std/zig/Parse.zig
Lines 180 to 204 in 60935de
ZON is only allowed to use a subset of the Zig language:
Anything else, such as functions, control flow logic, mathematical operations, etc., should be rejected by the parser.
Be careful with negative numbers, which are certainly allowed in ZON.
For testing, look into augmenting lib/std/zig/parser_test.zig.
The text was updated successfully, but these errors were encountered: