Skip to content

Commit

Permalink
feat: Allow generics of generics
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Jul 20, 2020
1 parent 14c0422 commit 649e91a
Show file tree
Hide file tree
Showing 4 changed files with 854 additions and 845 deletions.
2 changes: 1 addition & 1 deletion src/grammar/SanParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ expression:

scopedName: scopeResolver? name;

name: VariableName classTypeNameGenerics?;
name: VariableName classTypeNameGenerics*;

scopedNameNoGeneric: scopeResolver? nameNoGeneric;

Expand Down
6 changes: 3 additions & 3 deletions src/grammar/Visitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2723,9 +2723,9 @@ class Visitor

if (!names->empty())
{
if (auto generics_context = context->classTypeNameGenerics())
for (auto &generics_context : context->classTypeNameGenerics())
{
return this->visitTypeNameClassGenerics(generics_context, names);
names = this->visitTypeNameClassGenerics(generics_context, names);
}

return names;
Expand All @@ -2747,7 +2747,7 @@ class Visitor

if (!names->empty())
{
if (auto generics_context = context->classTypeNameGenerics())
for (auto &generics_context : context->classTypeNameGenerics())
{
names = this->visitTypeNameClassGenerics(generics_context, names);
}
Expand Down
Loading

0 comments on commit 649e91a

Please sign in to comment.