MCPcopy Create free account
hub / github.com/dop251/goja / checkComma

Method checkComma

parser/expression.go:1417–1421  ·  view source on GitHub ↗
(from, to file.Idx)

Source from the content-addressed store, hash-verified

1415}
1416
1417func (self *_parser) checkComma(from, to file.Idx) {
1418 if pos := strings.IndexByte(self.str[int(from)-self.base:int(to)-self.base], ','); pos >= 0 {
1419 self.error(from+file.Idx(pos), "Comma is not allowed here")
1420 }
1421}
1422
1423func (self *_parser) reinterpretAsArrayAssignmentPattern(left *ast.ArrayLiteral) ast.Expression {
1424 value := left.Value

Calls 2

errorMethod · 0.95
IdxTypeAlias · 0.92

Tested by

no test coverage detected