MCPcopy Create free account
hub / github.com/cel-expr/cel-go / Command

Method Command

repl/parser/commands_parser.go:748–837  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

746}
747
748func (p *CommandsParser) Command() (localctx ICommandContext) {
749 localctx = NewCommandContext(p, p.GetParserRuleContext(), p.GetState())
750 p.EnterRule(localctx, 2, CommandsParserRULE_command)
751 p.SetState(86)
752 p.GetErrorHandler().Sync(p)
753 if p.HasError() {
754 goto errorExit
755 }
756
757 switch p.GetTokenStream().LA(1) {
758 case CommandsParserT__0, CommandsParserT__1:
759 p.EnterOuterAlt(localctx, 1)
760 {
761 p.SetState(77)
762 p.Help()
763 }
764
765 case CommandsParserT__2:
766 p.EnterOuterAlt(localctx, 2)
767 {
768 p.SetState(78)
769 p.Let()
770 }
771
772 case CommandsParserT__3:
773 p.EnterOuterAlt(localctx, 3)
774 {
775 p.SetState(79)
776 p.Declare()
777 }
778
779 case CommandsParserT__4:
780 p.EnterOuterAlt(localctx, 4)
781 {
782 p.SetState(80)
783 p.Delete_()
784 }
785
786 case CommandsParserCOMMAND:
787 p.EnterOuterAlt(localctx, 5)
788 {
789 p.SetState(81)
790 p.Simple()
791 }
792
793 case CommandsParserT__5:
794 p.EnterOuterAlt(localctx, 6)
795 {
796 p.SetState(82)
797 p.Compile()
798 }
799
800 case CommandsParserT__6:
801 p.EnterOuterAlt(localctx, 7)
802 {
803 p.SetState(83)
804 p.Parse()
805 }

Callers 1

StartCommandMethod · 0.95

Calls 15

HelpMethod · 0.95
LetMethod · 0.95
DeclareMethod · 0.95
Delete_Method · 0.95
SimpleMethod · 0.95
CompileMethod · 0.95
ParseMethod · 0.95
ExprCmdMethod · 0.95
EmptyMethod · 0.95
NewCommandContextFunction · 0.85
LAMethod · 0.80
ReportErrorMethod · 0.80

Tested by

no test coverage detected