public override void Visit(ParameterSpec spec, object state)
        {
            spec.ParameterFormat = spec.ParameterFormat.Trim();
            spec.ParameterName   = spec.ParameterName.Trim();

            base.Visit(spec, null);
        }
 public override void Visit(ParameterSpec spec, object state)
 {
     _writer.Append("{");
     WriteText(spec.ParameterName, DefaultExpressionParser.StoppersParameterName);
     _writer.Append(":");
     WriteText(spec.ParameterFormat, DefaultExpressionParser.StoppersParameterFormat);
     _writer.Append("}");
 }
Beispiel #3
0
        ParameterSpec ParseParameterSpec()
        {
            //PRE: !EOF && _current == '{'
            var spec = new ParameterSpec();

            MoveNext(); //Take '{'

            var lparen = LookAheadFor(StartersParameterNameArgs);

            if (lparen == '(')
            {
                spec.ParameterName = ReadText("(");
                MoveNext(); //Take '('
                spec.Arguments = ReadText(StoppersParameterNameArgs);
                MoveNext(); //Take ')'
            }
            else
            {
                spec.ParameterName = ReadParameterName();
            }
            if (_current == ':')
            {
                MoveNext(); //Take it
                spec.ParameterFormat = ReadParameterFormat();
            }
            else
            {
                spec.ParameterFormat = "";
            }

            if (_current != '}')
            {
                ExpectedToken("ParameterSpec", "}");
            }

            MoveNext(); //Take '}';

            return(spec);
        }