diff --git a/hank/Parser.hx b/hank/HParser.hx similarity index 99% rename from hank/Parser.hx rename to hank/HParser.hx index 41ef639..08a8cba 100644 --- a/hank/Parser.hx +++ b/hank/HParser.hx @@ -13,7 +13,7 @@ typedef RuleFunction = HankBuffer->HankBuffer.Position->ExprType; Parses Hank scripts into ASTs for a Story object to interpret. Additional parsing happens in Alt.hx and Output.hx **/ @:allow(tests.ParserTest) -class Parser { +class HParser { static var symbols:Array<{key:String, value:RuleFunction}> = []; var buffers:Array = []; var ast:HankAST = []; diff --git a/hank/Story.hx b/hank/Story.hx index 222867c..7958818 100644 --- a/hank/Story.hx +++ b/hank/Story.hx @@ -62,7 +62,7 @@ class Story { var nodeScopes:Array; var altInstances:Map = new Map(); - var parser:Parser; + var parser:HParser; var embedMode:EmbedMode = Tunnel; var embeddedBlocks:Array = []; var parent:Option = None; @@ -72,7 +72,7 @@ class Story { var storedFrame:Option = None; - function new(r:Random, p:Parser, ast:HankAST, st:StoryNode, sc:Array, vc:Map, hi:HInterface) { + function new(r:Random, p:HParser, ast:HankAST, st:StoryNode, sc:Array, vc:Map, hi:HInterface) { this.insertionHooks = new Map(); this.random = r; @@ -123,7 +123,7 @@ class Story { var hInterface = new HInterface(storyTree, viewCounts); - var story = new Story(random, new Parser(), ast, storyTree, nodeScopes, viewCounts, hInterface); + var story = new Story(random, new HParser(), ast, storyTree, nodeScopes, viewCounts, hInterface); hInterface.setStory(story); hInterface.addVariable('story', story); @@ -137,7 +137,7 @@ class Story { } public static function FromFile(script:String, ?files:PreloadedFiles, ?randomSeed:Int):Story { - var parser = new Parser(); + var parser = new HParser(); var ast = parser.parseFile(script, files); return Story.FromAST(script, ast, randomSeed); }