diff options
| author | Tim Foley <tfoley@nvidia.com> | 2017-07-06 12:30:19 -0700 |
|---|---|---|
| committer | Tim Foley <tfoley@nvidia.com> | 2017-07-06 12:30:19 -0700 |
| commit | 098a5442caeb2e9505864e985900d4793014dffc (patch) | |
| tree | 40bc42fbc3b635d9823d93031fb577fb0b7b9cd6 /source/slang/emit.cpp | |
| parent | e05fba99e9f4fa08b6252e31c39b0d5ac2d23a34 (diff) | |
More exhaustive lowering
- Handle all statement cases explicitly (rather than falling back to the "structural recursion" mess)
- Handle back-references from child statements to their parents
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 0b79cb52f..79a8277bf 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -1491,12 +1491,15 @@ static void EmitType(EmitContext* context, RefPtr<ExpressionType> type) static void EmitType(EmitContext* context, TypeExp const& typeExp, Token const& nameToken) { EmitType(context, typeExp.type, - typeExp.exp ? typeExp.exp->Position : CodePosition(), nameToken.Content, nameToken.Position); + typeExp.exp ? typeExp.exp->Position : CodePosition(), + nameToken.Content, nameToken.Position); } static void EmitType(EmitContext* context, TypeExp const& typeExp, String const& name) { - EmitType(context, typeExp.type, typeExp.exp->Position, name, CodePosition()); + EmitType(context, typeExp.type, + typeExp.exp ? typeExp.exp->Position : CodePosition(), + name, CodePosition()); } // Statements |
