Lines Matching refs:parser
31 "github.com/KhronosGroup/SPIRV-Tools/utils/vscode/src/parser"
105 fullRange parser.Range
106 res parser.Results
109 // tokAt returns the parser token at the given position lp
110 func (f *file) tokAt(lp lsp.Position) *parser.Token {
112 p := parser.Position{Line: int(lp.Line) + 1, Column: int(lp.Character) + 1}
248 case *parser.Instruction:
250 case *parser.Identifier:
252 case *parser.Operand:
373 case parser.Ident:
378 case parser.Newline:
399 case parser.Newline, parser.Comment:
405 } else if t.Type != parser.Newline {
410 if t.Type == parser.Newline {
468 res, err := parser.Parse(source)
472 fullRange := parser.Range{
473 Start: parser.Position{Line: 1, Column: 1},
474 End: parser.Position{Line: len(res.Lines), Column: utf8.RuneCountInString(res.Lines[len(res.Lines)-1]) + 1},
498 func diagnosticToLSP(d parser.Diagnostic) lsp.Diagnostic {
506 func severityToLSP(s parser.Severity) lsp.DiagnosticSeverity {
508 case parser.SeverityError:
510 case parser.SeverityWarning:
512 case parser.SeverityInformation:
514 case parser.SeverityHint:
522 func rangeToLSP(r parser.Range) lsp.Range {
529 func positionToLSP(r parser.Position) lsp.Position {