Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Forgot to quote identifiers for one and zero

  • Loading branch information...
commit c575e1beca714c4a50c4562bb07db00c2be7d809 1 parent 90c11e9
@nickg authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 src/parse.y
  2. +2 −2 test/test_parse.c
View
4 src/parse.y
@@ -2015,10 +2015,10 @@ static tree_t bit_str_to_agg(const char *str, const loc_t *loc)
}
tree_t one = tree_new(T_REF);
- tree_set_ident(one, ident_new("1"));
+ tree_set_ident(one, ident_new("'1'"));
tree_t zero = tree_new(T_REF);
- tree_set_ident(zero, ident_new("0"));
+ tree_set_ident(zero, ident_new("'0'"));
for (const char *p = str + 2; *p != '\"'; p++) {
int n = (isdigit((int)*p) ? (*p - '0')
View
4 test/test_parse.c
@@ -1320,8 +1320,8 @@ START_TEST(test_bitstring)
p = parse();
fail_unless(tree_kind(p) == T_PACKAGE);
- ident_t one = ident_new("1");
- ident_t zero = ident_new("0");
+ ident_t one = ident_new("'1'");
+ ident_t zero = ident_new("'0'");
a = tree_value(tree_decl(p, 0));
fail_unless(tree_assocs(a) == 16);
Please sign in to comment.
Something went wrong with that request. Please try again.