authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-07-18 17:56:34-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-07-18 17:56:34-04:00
log7f1a550760a7a01d4ae8de51be16fb02d56b5cd2
tree07b8b5ba75bbafb87c14b297c2c0a4897382899c
parentbd1c55d2c2c9b68b5b6de175219cf95c815bf275

std.zig.parse: fix treating integer literals as string literals


2 files changed, 5 insertions(+), 5 deletions(-)

README.md+4-4
......@@ -21,19 +21,19 @@ clarity.
2121 * Compatible with C libraries with no wrapper necessary. Directly include
2222 C .h files and get access to the functions and symbols therein.
2323 * Provides standard library which competes with the C standard library and is
24 always compiled against statically in source form. Compile units do not
24 always compiled against statically in source form. Zig binaries do not
2525 depend on libc unless explicitly linked.
26 * Nullable type instead of null pointers.
26 * Optional type instead of null pointers.
2727 * Safe unions, tagged unions, and C ABI compatible unions.
2828 * Generics so that one can write efficient data structures that work for any
2929 data type.
3030 * No header files required. Top level declarations are entirely
3131 order-independent.
3232 * Compile-time code execution. Compile-time reflection.
33 * Partial compile-time function evaluation with eliminates the need for
33 * Partial compile-time function evaluation which eliminates the need for
3434 a preprocessor or macros.
3535 * The binaries produced by Zig have complete debugging information so you can,
36 for example, use GDB or MSVC to debug your software.
36 for example, use GDB, MSVC, or LLDB to debug your software.
3737 * Built-in unit tests with `zig test`.
3838 * Friendly toward package maintainers. Reproducible build, bootstrapping
3939 process carefully documented. Issues filed by package maintainers are
std/zig/parse.zig+1-1
......@@ -2356,7 +2356,7 @@ pub fn parse(allocator: *mem.Allocator, source: []const u8) !ast.Tree {
23562356 const token = nextToken(&tok_it, &tree);
23572357 switch (token.ptr.id) {
23582358 Token.Id.IntegerLiteral => {
2359 _ = try createToCtxLiteral(arena, opt_ctx, ast.Node.StringLiteral, token.index);
2359 _ = try createToCtxLiteral(arena, opt_ctx, ast.Node.IntegerLiteral, token.index);
23602360 continue;
23612361 },
23622362 Token.Id.FloatLiteral => {