SourceInfo returns character offset and newline position information about expression elements.
()
| 82 | |
| 83 | // SourceInfo returns character offset and newline position information about expression elements. |
| 84 | func (ast *Ast) SourceInfo() *exprpb.SourceInfo { |
| 85 | if ast == nil { |
| 86 | return nil |
| 87 | } |
| 88 | pbInfo, _ := celast.SourceInfoToProto(ast.NativeRep().SourceInfo()) |
| 89 | return pbInfo |
| 90 | } |
| 91 | |
| 92 | // ResultType returns the output type of the expression if the Ast has been type-checked, else |
| 93 | // returns chkdecls.Dyn as the parse step cannot infer the type. |