MCPcopy Create free account
hub / github.com/brettlangdon/forge / parseSetting

Method parseSetting

parser.go:208–222  ·  view source on GitHub ↗
(name string)

Source from the content-addressed store, hash-verified

206}
207
208func (parser *Parser) parseSetting(name string) error {
209 parser.readToken()
210 value, err := parser.parseSettingValue()
211 if err != nil {
212 return err
213 }
214 if isSemicolonOrNewline(parser.curTok.ID) == false {
215 msg := fmt.Sprintf("expected ';' or '\n' instead found '%s'", parser.curTok.Literal)
216 return parser.syntaxError(msg)
217 }
218 parser.readToken()
219
220 parser.curSection.Set(name, value)
221 return nil
222}
223
224func (parser *Parser) parseInclude() error {
225 if parser.curTok.ID != token.STRING {

Callers 1

parseMethod · 0.95

Calls 5

readTokenMethod · 0.95
parseSettingValueMethod · 0.95
syntaxErrorMethod · 0.95
isSemicolonOrNewlineFunction · 0.85
SetMethod · 0.45

Tested by

no test coverage detected