Exemplo n.º 1
0
 public ComposedLabelName(Location location, string labelName, string parameter)
     : base(location, labelName)
 {
     this.parameter = new LabelName(location, parameter);
 }
Exemplo n.º 2
0
        private ForRofContainerStatement CreateForrof(List<string> comments, Expression expression, Statement statement, List<LabelName> statementlabels, NonterminalToken token)
        {
            ForRofContainerStatement forrof;
            forrof = new ForRofContainerStatement(token.Location);
            forrof.Comments = comments;
            forrof.Labels = statementlabels;
            forrof.Add(statement);

            LabelName l = new LabelName(expression.Location, "#forof" + rofforCounter);
            if (statementlabels.Count > 0)
            {
                l = statementlabels[statementlabels.Count - 1];
            }
            else
            {
                statementlabels.Add(l);
            }

            //for label could be reused
            //CheckName(l, token.Tokens[1].Location);
            variables[l.Name] = expression;

            //for label could be reused
            //CheckName(l, token.Tokens[1].Location);
            forrof.LimitName = l.Name + "#" + rofforCounter + "#limit";
            variables[forrof.LimitName] = expression;

            rofforCounter++;
            return forrof;
        }