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