Antlr4.Semantics.UseDefAnalyzer.ActionIsContextDependent C# (CSharp) Method

ActionIsContextDependent() public static method

public static ActionIsContextDependent ( ActionAST actionAST ) : bool
actionAST Antlr4.Tool.Ast.ActionAST
return bool
        public static bool ActionIsContextDependent(ActionAST actionAST)
        {
            ANTLRStringStream @in = new ANTLRStringStream(actionAST.Token.Text);
            @in.Line = actionAST.Token.Line;
            @in.CharPositionInLine = actionAST.Token.CharPositionInLine;
            var listener = new ContextDependentListener();
            ActionSplitter splitter = new ActionSplitter(@in, listener);
            // forces eval, triggers listener methods
            splitter.GetActionTokens();
            return listener.dependent;
        }