parses the ${param,} string function parses the ${param,,} string function parses the ${param^} string function parses the ${param^^} string function
(name string)
| 337 | // parses the ${param^} string function |
| 338 | // parses the ${param^^} string function |
| 339 | func (t *Tree) parseCasingFunc(name string) (Node, error) { |
| 340 | node := new(FuncNode) |
| 341 | node.Param = name |
| 342 | |
| 343 | t.scanner.accept = acceptCasingFunc |
| 344 | t.scanner.mode = scanIdent |
| 345 | switch t.scanner.scan() { |
| 346 | case tokenIdent: |
| 347 | node.Name = t.scanner.string() |
| 348 | default: |
| 349 | return nil, ErrBadSubstitution |
| 350 | } |
| 351 | |
| 352 | return node, t.consumeRbrack() |
| 353 | } |
| 354 | |
| 355 | // parses the ${#param} string function |
| 356 | func (t *Tree) parseLenFunc() (Node, error) { |
no test coverage detected