Fixed whitespace issue in typing sections and added test cases.

This commit is contained in:
2017-06-18 05:18:52 +02:00
parent 6ce4eecb18
commit 230844c3ae
6 changed files with 59 additions and 3 deletions

View File

@@ -59,6 +59,7 @@ void parseAndAddPrimitiveTypeDeclarations(Context &context, ast::Domain &domain)
// Skip parent type information for now
tokenizer.getIdentifier();
tokenizer.skipWhiteSpace();
}
tokenizer.seek(position);
@@ -83,6 +84,7 @@ void parseAndAddPrimitiveTypeDeclarations(Context &context, ast::Domain &domain)
// If existing, parse and store parent type
auto parentType = parsePrimitiveType(context, domain);
tokenizer.skipWhiteSpace();
auto &types = domain.types;
@@ -91,9 +93,6 @@ void parseAndAddPrimitiveTypeDeclarations(Context &context, ast::Domain &domain)
// All types up to now are labeled with their parent types
inheritanceIndex = i + 1;
tokenizer.skipWhiteSpace();
i++;
}
}