Permalink
Browse files

Merge pull request #8 from shamanas/patch-1

Fixed namespace type access
  • Loading branch information...
2 parents 2fce136 + 5c8cb7a commit 7fdcebbb60dbdf802312833be2e1b20b42076b85 @shamanas shamanas committed May 12, 2012
Showing with 8 additions and 9 deletions.
  1. +8 −9 grammar/nagaqueen.leg
View
@@ -960,29 +960,28 @@ TypeBase = FuncType |
# a GenericType is just like a Type but with non-optional generic type arguments
# it's used when we have to decide between a Type and a VariableAccess
GenericType
- = (t:TypeBase
+ = (
+ temp: Old # When entering the TypeBase rule, i gets overwritten, so we just use a dummy rule to store it
+ - i:IDENT { temp=nq_StringClone(i); }
+ - t:TypeBase { t=$$=nq_onTypeNamespace(core->this, t, temp); }
- '<' - t2:Type { nq_onTypeGenericArgument(core->this, t, t2); }
(- ',' - t2:Type { nq_onTypeGenericArgument(core->this, t, t2); })*
- '>'
- ('*' { t=$$=nq_onTypePointer (core->this, t); }
| '@' { t=$$=nq_onTypeReference(core->this, t); }
| "[" WS { inner=NULL; } - inner:Expr? "]" { t=$$=nq_onTypeBrackets(core->this, t, inner); }
)*
- - { $$=t; }) |
- ('('
- temp: Old # When entering the TypeBase rule, i gets overwritten, so we just use a dummy rule to store it
- - i:IDENT { temp=nq_StringClone(i); }
- - t:TypeBase { t=$$=nq_onTypeNamespace(core->this, t, temp); }
+ - { $$=t; }
+ ) |
+ (t:TypeBase
- '<' - t2:Type { nq_onTypeGenericArgument(core->this, t, t2); }
(- ',' - t2:Type { nq_onTypeGenericArgument(core->this, t, t2); })*
- '>'
- ('*' { t=$$=nq_onTypePointer (core->this, t); }
| '@' { t=$$=nq_onTypeReference(core->this, t); }
| "[" WS { inner=NULL; } - inner:Expr? "]" { t=$$=nq_onTypeBrackets(core->this, t, inner); }
)*
- - { $$=t; }
- ')'
- )
+ - { $$=t; })
Type = list:TypeList { $$=list; } | (
t:TypeBase

0 comments on commit 7fdcebb

Please sign in to comment.