SnippetToRawAST converts a Jsonnet code snippet to an AST (without any transformations). Any fodder after the final token is returned as well.
(diagnosticFilename ast.DiagnosticFileName, importedFilename, snippet string)
| 1402 | // SnippetToRawAST converts a Jsonnet code snippet to an AST (without any transformations). |
| 1403 | // Any fodder after the final token is returned as well. |
| 1404 | func SnippetToRawAST(diagnosticFilename ast.DiagnosticFileName, importedFilename, snippet string) (ast.Node, ast.Fodder, error) { |
| 1405 | tokens, err := Lex(diagnosticFilename, importedFilename, snippet) |
| 1406 | if err != nil { |
| 1407 | return nil, nil, err |
| 1408 | } |
| 1409 | return Parse(tokens) |
| 1410 | } |
searching dependent graphs…