Documentation ¶
Overview ¶
Package semantic contains semantic checking for AST parsed from a IDL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deref ¶ added in v0.1.2
Deref returns the target type that t refers to and the AST it belongs to. Typedef will be dereferenced.
func ResolveSymbols ¶ added in v0.1.2
ResolveSymbols checks the existence of each symbol in the current AST and build a name-to-category mapping for all locally-defined symbols. If a type, a value or a service refers to another one from an external IDL, the index of that IDL in the include list will be recorded. ResolveSymbols stops when it encounters any error.
func SplitType ¶ added in v0.1.2
SplitType tries to split the given ID into two part: the name of an included IDL without file extension and the type name in that IDL. If ID is a type name containing no dot, then the it is returned unchanged.
func SplitValue ¶ added in v0.1.2
SplitValue tries to find any possible resolution of the given ID assuming it is a name of a constant value or an enum value. When ID contains no dot, it is returned unchanged. Otherwise, this function tries to explain it as 'IDL.Value' or as 'IDL.EnumType.Value' and to return all possible divisions.