| 1 | // Copyright 2018 Google LLC |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package parserscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/ |
| 16 | |
| 17 | import ( |
| 18 | "github.com/google/cel-go/commonscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/" |
| 19 | ) |
| 20 | |
| 21 | // parseErrors is a specialization of Errors. |
| 22 | type parseErrorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors# struct { |
| 23 | errsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#errs. *commonscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/.Errorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Errors# |
| 24 | } |
| 25 | |
| 26 | // errorCount indicates the number of errors reported. |
| 27 | func (e *parseErrorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#) errorCountscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#errorCount().() int { |
| 28 | return len(e.errsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#errs..GetErrorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Errors#GetErrors().()) |
| 29 | } |
| 30 | |
| 31 | func (e *parseErrorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#) internalErrorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#internalError().(message string) { |
| 32 | e.errsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#errs..ReportErrorAtIDscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Errors#ReportErrorAtID().(0, commonscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/.NoLocationscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/NoLocation., "%s", message) |
| 33 | } |
| 34 | |
| 35 | func (e *parseErrorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#) syntaxErrorscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#syntaxError().(l commonscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/.Locationscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Location#, message string) { |
| 36 | e.errsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#errs..ReportErrorAtIDscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Errors#ReportErrorAtID().(0, l, "Syntax error: %s", message) |
| 37 | } |
| 38 | |
| 39 | func (e *parseErrorsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#) reportErrorAtIDscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#reportErrorAtID().(id int64, l commonscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/.Locationscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Location#, message string, args ...any) { |
| 40 | e.errsscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/parser`/parseErrors#errs..ReportErrorAtIDscip-go gomod github.com/google/cel-go . `github.com/google/cel-go/common`/Errors#ReportErrorAtID().(id, l, message, args...) |
| 41 | } |