private ExpressionInfo AnalyzeSubnode(XmlNode node)
{
switch (node.LocalName)
{
case AstConstants.Subnodes.Cond:
return Subnode_Cond(node);
case AstConstants.Subnodes.Else:
case AstConstants.Subnodes.Var:
return Subnode_WithNode(node);
case AstConstants.Subnodes.ValueVar:
case AstConstants.Subnodes.KeyVar:
case AstConstants.Subnodes.Expr:
case AstConstants.Subnodes.If:
return Subnode_WithNodeOrScalar(node);
case AstConstants.Subnodes.Exprs:
return Subnode_Exprs(node);
case AstConstants.Subnodes.Value:
return Subnode_Value(node);
case AstConstants.Subnodes.Key:
return Subnode_Key(node);
case AstConstants.Subnodes.Loop:
case AstConstants.Subnodes.Init:
return Subnode_Init(node);
case AstConstants.Subnodes.Left:
case AstConstants.Subnodes.Right:
return Analyze(node.GetSubNodesByPrefix(AstConstants.Node).Single());
case AstConstants.Subnodes.Adaptions:
case AstConstants.Subnodes.Args:
case AstConstants.Subnodes.ByRef:
case AstConstants.Subnodes.Cases:
case AstConstants.Subnodes.Catches:
case AstConstants.Subnodes.Class:
case AstConstants.Subnodes.Consts:
case AstConstants.Subnodes.Declares:
case AstConstants.Subnodes.Default:
case AstConstants.Subnodes.Dim:
case AstConstants.Subnodes.Extends:
case AstConstants.Subnodes.FinallyStmts:
case AstConstants.Subnodes.Implements:
case AstConstants.Subnodes.InsteadOf:
case AstConstants.Subnodes.Items:
case AstConstants.Subnodes.Method:
case AstConstants.Subnodes.Name:
case AstConstants.Subnodes.NewModifier:
case AstConstants.Subnodes.NewName:
case AstConstants.Subnodes.Num:
case AstConstants.Subnodes.Params:
case AstConstants.Subnodes.Parts:
case AstConstants.Subnodes.Props:
case AstConstants.Subnodes.Remaining:
case AstConstants.Subnodes.ReturnType:
case AstConstants.Subnodes.Static:
case AstConstants.Subnodes.Stmts:
case AstConstants.Subnodes.Trait:
case AstConstants.Subnodes.Traits:
case AstConstants.Subnodes.Type:
case AstConstants.Subnodes.Unpack:
case AstConstants.Subnodes.Uses:
case AstConstants.Subnodes.Variadic:
case AstConstants.Subnodes.Vars:
throw new NotImplementedException("Unknown AST subnode. Was " + node.LocalName);
default:
throw new NotImplementedException("Unknown AST subnode. Was " + node.LocalName);
}
}