ABB.Swum.NounPhraseRule.ConstructSwum C# (CSharp) Method

ConstructSwum() public method

Constructs the SWUM for the given node, using this rule.
public ConstructSwum ( ProgramElementNode node ) : void
node ABB.Swum.Nodes.ProgramElementNode The node to construct SWUM for.
return void
        public override void ConstructSwum(ProgramElementNode node)
        {
            if (node is MethodDeclarationNode)
            {
                var mdn = (MethodDeclarationNode)node;

                mdn.AssignStructuralInformation(this.Splitter, this.PosTagger);
                if (mdn.ReturnType != null && mdn.ReturnType.Name.ToLower() == "void")
                {
                    ParseReactiveName(mdn); //this also sets the Action, Theme, and arguments
                }
                else
                {
                    this.PosTagger.TagNounPhrase(mdn.ParsedName);
                    mdn.CreateThemeFromPhrases(mdn.Preamble, mdn.ParsedName);
                    mdn.Action = mdn.ParsedName[0].GetNewWord("get", PartOfSpeechTag.Verb);
                    SetDefaultUnknownArguments(mdn);
                }
                mdn.SwumRuleUsed = this;
            }
        }
    }