mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fixed array problem with one element.
This commit is contained in:
parent
4fbbdf708a
commit
ea9dd315ae
@ -86,7 +86,7 @@ inline peglib::peg& get_parser()
|
||||
throw std::logic_error("invalid peg grammar");
|
||||
}
|
||||
|
||||
parser.enable_ast(true, { "PARAMETERS", "ARGUMENTS", "OBJECT" });
|
||||
parser.enable_ast(true, { "PARAMETERS", "ARGUMENTS", "OBJECT", "ARRAY" });
|
||||
}
|
||||
|
||||
return parser;
|
||||
|
@ -49,6 +49,9 @@ test_array = fn () {
|
||||
|
||||
b = []
|
||||
assert(b.size() == 0)
|
||||
|
||||
c = [1]
|
||||
assert(c.size() == 1)
|
||||
}
|
||||
|
||||
g_ = 1
|
||||
|
Loading…
Reference in New Issue
Block a user