Ejemplo n.º 1
0
        private void ParseConversationLine(List <SclLexicalLine> lines, int atIndent, SclStatementSequence statementSequence,
                                           ref int currentLine)
        {
            SclLexicalLine line = lines[currentLine];

            if (currentLine < lines.Count - 1 && lines[currentLine + 1].IndentCount > atIndent)
            {
                ParseMenu(lines, line.IndentCount, statementSequence, ref currentLine);
            }
            else if (line.Kind == SclLineKind.Command)
            {
                statementSequence.Statements.Add(new SclCommandStatement(line));
                currentLine++;
            }
            else if (line.Kind == SclLineKind.SimpleLine)
            {
                statementSequence.Statements.Add(new SclSimpleLineStatement(line));
                currentLine++;
            }
            else
            {
                throw new Exception("Bad parse.");
            }
        }
 public SclSimpleLineStatement(SclLexicalLine line)
 {
     this.Line = line.PureText;
 }
Ejemplo n.º 3
0
 public SclCommandStatement(SclLexicalLine line)
 {
     this.Command   = line.Command;
     this.Arguments = line.Arguments;
 }