コード例 #1
0
        public override object VisitMachineEntry(PParser.MachineEntryContext context)
        {
            var subExpr = context.varDecl() ??
                          context.funDecl() ??
                          (IParseTree)context.group() ??
                          context.stateDecl() ??
                          throw Handler.InternalError(context, new ArgumentOutOfRangeException(nameof(context)));

            return(Visit(subExpr));
        }
コード例 #2
0
        public override object VisitMachineEntry(PParser.MachineEntryContext context)
        {
            var subExpr = context.varDecl() ??
                          context.funDecl() ??
                          (IParseTree)context.group() ??
                          context.stateDecl() ??
                          throw Handler.InternalError(context,
                                                      "machine entry was none of a variable, function, group, or state declaration");

            return(Visit(subExpr));
        }