2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-02 01:01:54 +00:00

Import code from previous AssetBuilder version

This commit is contained in:
Jan
2019-09-24 10:45:09 +02:00
parent 5609557516
commit 0d8432d4f7
919 changed files with 154412 additions and 26 deletions

View File

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ZoneCodeGenerator.Parsing.Matching
{
class MatchingContext
{
public ILexer Lexer { get; }
public bool Verbose { get; set; }
private readonly Dictionary<string, TokenMatcher> taggedMatchers;
public MatchingContext(ILexer lexer, Dictionary<string, TokenMatcher> taggedMatchers)
{
Lexer = lexer;
this.taggedMatchers = taggedMatchers;
#if DEBUG
Verbose = true;
#else
Verbose = false;
#endif
}
public TokenMatcher GetMatcherByTag(string tag)
{
return taggedMatchers.ContainsKey(tag) ? taggedMatchers[tag] : null;
}
}
}