rename Parser to HParser

This commit is contained in:
2025-10-30 20:11:43 -05:00
parent 829dd9023d
commit 1630beb8c1
2 changed files with 5 additions and 5 deletions

View File

@@ -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<HankBuffer> = [];
var ast:HankAST = [];

View File

@@ -62,7 +62,7 @@ class Story {
var nodeScopes:Array<StoryNode>;
var altInstances:Map<Alt, AltInstance> = new Map();
var parser:Parser;
var parser:HParser;
var embedMode:EmbedMode = Tunnel;
var embeddedBlocks:Array<Story> = [];
var parent:Option<Story> = None;
@@ -72,7 +72,7 @@ class Story {
var storedFrame:Option<StoryFrame> = None;
function new(r:Random, p:Parser, ast:HankAST, st:StoryNode, sc:Array<StoryNode>, vc:Map<StoryNode, Int>, hi:HInterface) {
function new(r:Random, p:HParser, ast:HankAST, st:StoryNode, sc:Array<StoryNode>, vc:Map<StoryNode, Int>, 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);
}