Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
b3b00 committed Sep 12, 2024
1 parent 8cfe208 commit bb67682
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/samples/SimpleTemplate/TemplateLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ public enum TemplateLexer
[Mode("code")]
STRING,

// [Int()]
// [Mode("code")]
// INT,

[Int()]
[Mode("code")]
INT,
Expand Down
2 changes: 2 additions & 0 deletions src/sly/lexer/AotLexerBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ public IAotLexemeBuilder<IN> Double(IN tokenId, string decimalDelimiter = ".", i
return this;
}

public IAotLexemeBuilder<IN> Int(IN tokenId, int channel = Channels.Main) => Integer(tokenId, channel);

public IAotLexemeBuilder<IN> Integer(IN tokenId, int channel = Channels.Main)
{
Add(tokenId, new LexemeAttribute(GenericToken.Int, channel:Channels.Main) , null);
Expand Down
2 changes: 2 additions & 0 deletions src/sly/lexer/IAotLexerBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public interface IAotLexerBuilder<IN> where IN : struct
public IAotLexemeBuilder<IN> Double(IN tokenId, string decimalDelimiter = ".",
int channel = Channels.Main);

public IAotLexemeBuilder<IN> Int(IN tokenId, int channel = Channels.Main);

public IAotLexemeBuilder<IN> Integer(IN tokenId, int channel = Channels.Main);

public IAotLexemeBuilder<IN> Sugar(IN tokenId, string token, int channel = Channels.Main);
Expand Down

0 comments on commit bb67682

Please sign in to comment.