private static String GetLeafNodeValue(Semantics.Node n, ISemanticsNodeMaker nm, String ErrorCause) { if (!n.OnLeaf) { throw new Syntax.InvalidEvaluationException(ErrorCause, nm.GetFileRange(n), n); } return(n.Leaf); }
private static TypeRef ParseTypeRef(TFSemantics.Node TypeNode, ISemanticsNodeMaker nm, Dictionary <Object, TextRange> Positions) { var ts = ParseTypeSpec(TypeNode, nm, Positions); if (!ts.OnTypeRef) { throw new InvalidEvaluationException("ExpectedTypeRef", nm.GetFileRange(ts), ts); } return(ts.TypeRef); }