diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-04-02 14:21:45 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-04-02 20:10:07 +0200 |
| commit | 3e679c51c03ac13a5b4b601873689925eda3cc16 (patch) | |
| tree | cc4d32d731ff4eca66ae2af36d3bd229b8f08a4d /pkg/compiler/compiler.go | |
| parent | 374050e90404a9eeea577d7c97fbc6ef0dacd478 (diff) | |
pkg/compiler: support non-zero terminated filenames
Now file names become:
string[filename]
with a possibility of using other string features:
stringnoz[filename]
string[filename, CONST_SIZE]
and filename is left as type alias as it is commonly used:
type filename string[filename]
Diffstat (limited to 'pkg/compiler/compiler.go')
| -rw-r--r-- | pkg/compiler/compiler.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/compiler/compiler.go b/pkg/compiler/compiler.go index f1e39b269..809de5bd5 100644 --- a/pkg/compiler/compiler.go +++ b/pkg/compiler/compiler.go @@ -64,8 +64,11 @@ func Compile(desc *ast.Description, consts map[string]uint64, target *targets.Ta structNodes: make(map[*prog.StructDesc]*ast.Struct), structVarlen: make(map[string]bool), } - for name, typedef := range builtinTypedefs { - comp.typedefs[name] = typedef + for name, n := range builtinTypedefs { + comp.typedefs[name] = n + } + for name, n := range builtinStrFlags { + comp.strFlags[name] = n } comp.typecheck() // The subsequent, more complex, checks expect basic validity of the tree, |
