Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #4 from Yardanico/master
Browse files Browse the repository at this point in the history
Fir for float literals with scientific notation
  • Loading branch information
andersfr committed Sep 7, 2019
2 parents 92a86d4 + 6d2d276 commit 4ffcee8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions example.zig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub async fn nextCodepointSlice(it: *Utf8Iterator) ?[]const u8 {
cklj = asdf;

var num = 0.0;
var num2 = 1e2;
const c = @cImport({
@cInclude("lzma_header.c");
});
Expand Down
2 changes: 1 addition & 1 deletion zig/zig_lexer.zig
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub const Lexer = struct {
while(true) {
switch (self.peek) {
'0'...'9' => {},
'.' => return self.float_digits(false),
'.', 'e' => return self.float_digits(false),
else => return Id.IntegerLiteral,
}
self.getc();
Expand Down

0 comments on commit 4ffcee8

Please sign in to comment.