/// <summary> /// Parses a value from the portion of the document at the current position, /// according to the instructions available in the macro. /// </summary> /// <param name="Document">ASN.1 document being parsed.</param> /// <returns>Parsed ASN.1 value node.</returns> public Asn1Value ParseValue(Asn1Document Document) { this.typeNotation.Parse(Document, this); Document.AssertNextToken("::="); Asn1Node Node = this.valueNotation.Parse(Document, this); if (!(Node is Asn1Value Value)) { throw Document.SyntaxError("Value expected."); } return(Value); }
/// <summary> /// Parses the portion of the document at the current position, according to the /// instructions available in the macro. /// </summary> /// <param name="Document">ASN.1 document being parsed.</param> /// <param name="Macro">Macro being executed.</param> /// <returns>Parsed ASN.1 node.</returns> public override Asn1Node Parse(Asn1Document Document, Asn1Macro Macro) { Document.AssertNextToken(this.value); return(new Values.Asn1StringValue(this.value)); }