aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/ast/parser_test.go
Commit message (Collapse)AuthorAgeFilesLines
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-4/+4
| | | | Any is the preferred over interface{} now in Go.
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-1/+1
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* pkg/ast: support expressions with ast.TypeAleksandr Nogikh2024-02-191-10/+5
| | | | | | | | | | | | | | | | | | | | | So far they have the following grammar: OP = "==", "!=", "&" value-expr = value-expr OP value-expr | factor factor = "(" and-expr ")" | integer | identifier | string Operators are left associative, e.g. A & B & C is the same as (A & B) & C. Further restrictions will be imposed in pkg/compiler. This will help implement conditionally included fields.
* all: ioutil is deprecated in go1.19 (#3718)Taras Madan2023-02-231-3/+3
|
* sys/targets: add OS/Arch name constsDmitry Vyukov2020-10-261-1/+3
| | | | | | | | | | | | We use strings to identify OS/Arch. These strings are duplicated throughout the code base massively. golangci-lint points to possiblity of typos and duplication. We already had to define these names in pkg/csource and disable checking for prog package. A future change triggers such warnings in another package. Add OS/Arch name consts to sys/targets so that they can be used to refer to OS/Arch. Use the consts everywhere.
* pkg/ast: extend testsDmitry Vyukov2020-05-011-0/+30
| | | | Test more functions that we currently don't test.
* pkg/compiler: add tests for generation phaseDmitry Vyukov2020-03-171-2/+2
| | | | | | Add errors3.txt with tests for errors that are produced during generation phase. Refactor tests to reduce duplication. Tidy struct/union size errors: better locations and make testable.
* pkg/ast: refactor WalkDmitry Vyukov2018-01-111-1/+1
| | | | | Refactor Walk so that it's possible to abort or wrap walk of child nodes. Will be needed for future changes.
* pkg/ast: fix TestParseAllDmitry Vyukov2017-10-191-10/+6
|
* pkg/compiler: more static error checkingDmitry Vyukov2017-08-271-72/+11
| | | | Update #217
* pkg/compiler: move more const-processing code to compilerDmitry Vyukov2017-08-271-27/+29
|
* pkg/compiler, sys/syz-sysgen: move const handling to pkg/compilerDmitry Vyukov2017-08-271-18/+23
| | | | Now pkg/compiler deals with consts.
* Makefile: enforce formatting of sys files in presubmitDmitry Vyukov2017-08-181-6/+4
|
* pkg/ast: new parser for sys descriptionsDmitry Vyukov2017-08-181-0/+180
The old parser in sys/sysparser is too hacky, difficult to extend and drops debug info too early, so that we can't produce proper error messages. Add a new parser that is build like a proper language parser and preserves full debug info for every token.