コード例 #1
0
 /// <summary>
 /// Preferred constructor.
 /// </summary>
 /// <param name="type">The operator type</param>
 /// <param name="tokenString">The string representation of the operator</param>
 /// <param name="sourceFile">The source file in which this token is located</param>
 /// <param name="line">The line in the file this token is located</param>
 /// <param name="posInLine">The position in the line where this token is located.</param>
 public SpecialToken(SpecialTokenType type, string tokenString, FileInfo sourceFile, int line, int posInLine)
 {
     _tokenType   = type;
     _tokenString = tokenString;
     _file        = sourceFile;
     _line        = line;
     _posInLine   = posInLine;
 }
コード例 #2
0
ファイル: SpecialToken.cs プロジェクト: codeflood/chel
 /// <summary>
 /// Create a new instance.
 /// </summary>
 /// <param name="location">The location in the source where the token was parsed from.</param>
 /// <param name="type">The type of the token.</param>
 public SpecialToken(SourceLocation location, SpecialTokenType type)
     : base(location)
 {
     Type = type;
 }
コード例 #3
0
 private Token HandleSpecial(SpecialTokenType type)
 {
     return(new SpecialToken(CurrentLocation, type));
 }