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....@@ -21,19 +21,19 @@ clarity.
21 * Compatible with C libraries with no wrapper necessary. Directly include21 * Compatible with C libraries with no wrapper necessary. Directly include
22 C .h files and get access to the functions and symbols therein.22 C .h files and get access to the functions and symbols therein.
23 * Provides standard library which competes with the C standard library and is23 * Provides standard library which competes with the C standard library and is
24 always compiled against statically in source form. Compile units do not24 always compiled against statically in source form. Zig binaries do not
25 depend on libc unless explicitly linked.25 depend on libc unless explicitly linked.
26 * Nullable type instead of null pointers.26 * Optional type instead of null pointers.
27 * Safe unions, tagged unions, and C ABI compatible unions.27 * Safe unions, tagged unions, and C ABI compatible unions.
28 * Generics so that one can write efficient data structures that work for any28 * Generics so that one can write efficient data structures that work for any
29 data type.29 data type.
30 * No header files required. Top level declarations are entirely30 * No header files required. Top level declarations are entirely
31 order-independent.31 order-independent.
32 * Compile-time code execution. Compile-time reflection.32 * Compile-time code execution. Compile-time reflection.
33 * Partial compile-time function evaluation with eliminates the need for33 * Partial compile-time function evaluation which eliminates the need for
34 a preprocessor or macros.34 a preprocessor or macros.
35 * The binaries produced by Zig have complete debugging information so you can,35 * 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.
37 * Built-in unit tests with `zig test`.37 * Built-in unit tests with `zig test`.
38 * Friendly toward package maintainers. Reproducible build, bootstrapping38 * Friendly toward package maintainers. Reproducible build, bootstrapping
39 process carefully documented. Issues filed by package maintainers are39 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 {...@@ -2356,7 +2356,7 @@ pub fn parse(allocator: *mem.Allocator, source: []const u8) !ast.Tree {
2356 const token = nextToken(&tok_it, &tree);2356 const token = nextToken(&tok_it, &tree);
2357 switch (token.ptr.id) {2357 switch (token.ptr.id) {
2358 Token.Id.IntegerLiteral => {2358 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);
2360 continue;2360 continue;
2361 },2361 },
2362 Token.Id.FloatLiteral => {2362 Token.Id.FloatLiteral => {