blob: 112cdd4bfbebe0e8b8f6d3b98f51dedd5abd8caf [file] [log] [blame]
Marcel van Lohuizend96ad3d2018-12-10 15:30:20 +01001// Copyright 2018 The CUE Authors
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
15package internal // import "cuelang.org/go/internal"
16
17// TODO: refactor packages as to make this package unnecessary.
18
19// DebugStr prints a syntax node.
20var DebugStr func(x interface{}) string
Marcel van Lohuizen17157ea2018-12-11 10:41:10 +010021
22// EvalExpr evaluates an expression within an existing struct value.
23// Identifiers only resolve to values defined within the struct.
24//
25// Expressions may refer to builtin packages if they can be uniquely identified
26//
27// Both value and result are of type cue.Value, but are an interface to prevent
28// cyclic dependencies.
29//
30// TODO: extract interface
31var EvalExpr func(value, expr interface{}) (result interface{})