ZoneCodeGenerator: Fix recognizing but not doing anything with const tokens in variables

This commit is contained in:
Jan 2019-11-06 18:41:21 +01:00
parent 70a5763d4f
commit 82604038c7

View File

@ -20,7 +20,7 @@ namespace ZoneCodeGenerator.Parsing.C_Header.Tests
private const string TokenConst = "constToken"; private const string TokenConst = "constToken";
private static readonly TokenMatcher[] arrayOfPointersMatchers = { private static readonly TokenMatcher[] arrayOfPointersMatchers = {
new MatcherGroupOptional(new MatcherLiteral("const").WithTag(TokenConst)), new MatcherGroupOptional(new MatcherLiteral("const").WithName(TokenConst)),
new MatcherTypename().WithName(TypeNameToken), new MatcherTypename().WithName(TypeNameToken),
new MatcherGroupLoop(MatcherGroupLoop.LoopMode.ZeroOneMultiple, new MatcherLiteral("*").WithName(PointerTokens)), new MatcherGroupLoop(MatcherGroupLoop.LoopMode.ZeroOneMultiple, new MatcherLiteral("*").WithName(PointerTokens)),
new MatcherName().WithName(NameToken), new MatcherName().WithName(NameToken),
@ -33,7 +33,7 @@ namespace ZoneCodeGenerator.Parsing.C_Header.Tests
}; };
private static readonly TokenMatcher[] pointerToArrayMatchers = { private static readonly TokenMatcher[] pointerToArrayMatchers = {
new MatcherGroupOptional(new MatcherLiteral("const").WithTag(TokenConst)), new MatcherGroupOptional(new MatcherLiteral("const").WithName(TokenConst)),
new MatcherTypename().WithName(TypeNameToken), new MatcherTypename().WithName(TypeNameToken),
new MatcherLiteral("("), new MatcherLiteral("("),
new MatcherGroupLoop(MatcherGroupLoop.LoopMode.OneMultiple, new MatcherLiteral("*").WithName(PointerTokens)), new MatcherGroupLoop(MatcherGroupLoop.LoopMode.OneMultiple, new MatcherLiteral("*").WithName(PointerTokens)),