Beispiel #1
0
 public void WriteLiteral(AstLiteral a)
 {
     WriteGlobal(a.DocComment);
     WriteAttributes(a.Attributes);
     WriteIdentifier(a.Name);
     Write(a.OptionalValue);
 }
Beispiel #2
0
        AstLiteral[] ReadLiterals()
        {
            var len      = Read7BitEncodedInt();
            var literals = new AstLiteral[len];

            for (var i = 0; i < len; i++)
            {
                literals[i] = new AstLiteral(
                    ReadGlobalString(),
                    ReadAttributes(),
                    ReadIdentifier(),
                    ReadExpression());
            }
            return(literals);
        }