MCPcopy Index your code
hub / github.com/lmorg/murex / parseCommentMultiLine

Method parseCommentMultiLine

lang/expressions/parse_comment.go:24–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24func (tree *ParserT) parseCommentMultiLine() error {
25 for tree.charPos += 2; tree.charPos < len(tree.expression); tree.charPos++ {
26 r := tree.expression[tree.charPos]
27
28 switch r {
29 case '\n':
30 tree.crLf()
31
32 case '#':
33 if tree.nextChar() == '/' {
34 goto endCommentMultiLine
35 }
36
37 }
38 }
39
40 return raiseError(tree.expression, nil, tree.charPos, "comment opened with '/#' but no closing token '#/' could be found")
41
42endCommentMultiLine:
43 tree.charPos++
44
45 return nil
46}

Callers 8

parseStatementMethod · 0.95
parseObjectMethod · 0.95
parseArrayMethod · 0.95
parseBlockQuoteMethod · 0.95
parseSwitchMethod · 0.95
parseExpressionMethod · 0.95
ParseBlockMethod · 0.80

Calls 3

crLfMethod · 0.95
nextCharMethod · 0.95
raiseErrorFunction · 0.70

Tested by

no test coverage detected