Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:XenonCore.Lexeme"/> class.
 /// </summary>
 /// <param name="type">Type.</param>
 /// <param name="unit">Unit.</param>
 /// <param name="value">Value.</param>
 /// <param name="literal">Literal.</param>
 public Lexeme(TokenClass type, SourceUnit unit, char value, object literal = null)
     : this(type, unit, value.ToString(), literal)
 {
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:XenonCore.Lexer"/> class.
 /// </summary>
 /// <param name="source">Source.</param>
 public Lexer(string source)
 {
     lexemes     = new List <Lexeme> ();
     this.source = SourceUnit.FromSource(source);
 }