MCPcopy Create free account
hub / github.com/crossoverJie/gscript / OperatorOverloading

Method OperatorOverloading

parser/gscript_parser.go:1353–1388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1351}
1352
1353func (p *GScriptParser) OperatorOverloading() (localctx IOperatorOverloadingContext) {
1354 localctx = NewOperatorOverloadingContext(p, p.GetParserRuleContext(), p.GetState())
1355 p.EnterRule(localctx, 10, GScriptParserRULE_operatorOverloading)
1356 var _la int
1357
1358 defer func() {
1359 p.ExitRule()
1360 }()
1361
1362 defer func() {
1363 if err := recover(); err != nil {
1364 if v, ok := err.(antlr.RecognitionException); ok {
1365 localctx.SetException(v)
1366 p.GetErrorHandler().ReportError(p, v)
1367 p.GetErrorHandler().Recover(p, v)
1368 } else {
1369 panic(err)
1370 }
1371 }
1372 }()
1373
1374 p.EnterOuterAlt(localctx, 1)
1375 {
1376 p.SetState(136)
1377 _la = p.GetTokenStream().LA(1)
1378
1379 if !(((_la-27)&-(0x1f+1)) == 0 && ((1<<uint((_la-27)))&((1<<(GScriptParserGT-27))|(1<<(GScriptParserLT-27))|(1<<(GScriptParserMULT-27))|(1<<(GScriptParserDIV-27))|(1<<(GScriptParserPLUS-27))|(1<<(GScriptParserSUB-27))|(1<<(GScriptParserEQUAL-27))|(1<<(GScriptParserLE-27))|(1<<(GScriptParserGE-27))|(1<<(GScriptParserNOTEQUAL-27)))) != 0) {
1380 p.GetErrorHandler().RecoverInline(p)
1381 } else {
1382 p.GetErrorHandler().ReportMatch(p)
1383 p.Consume()
1384 }
1385 }
1386
1387 return localctx
1388}
1389
1390// IFunctionBodyContext is an interface to support dynamic dispatch.
1391type IFunctionBodyContext interface {

Callers 1

FunctionDeclarationMethod · 0.95

Calls 3

EnterRuleMethod · 0.45
ExitRuleMethod · 0.45

Tested by

no test coverage detected