Branch: refs/heads/master
Revision: 5e691d1
Author: e-kayrakli
Log Message:
Merge pull request #16879 from e-kayrakli/string-literal-indexing
Allow string/bytes literal indexing
This PR is just a more complete version of @rahulghangas’s https://github.com/chapel-lang/chapel/pull/16184.
Resolves https://github.com/chapel-lang/chapel/issues/16165
Without this PR, the parser is unable to parse "Chapel"[0]
as valid syntax.
This PR seperates STRINGLITERAL
and BYTESLITERAL
under a new nonterminal
str_bytes_literal
. Then, renames fun_expr
as call_base_expr
and uses
str_bytes_literal
under it.
[Mostly developed by @rahulghangas, reviewed by @bradcray]
Test:
- [x] standard
Modified Files:
A test/parsing/stringLiteralIndex/indexWithNonParam.chpl
A test/parsing/stringLiteralIndex/indexWithNonParam.good
A test/parsing/stringLiteralIndex/paramIndexingIsParam.bad
A test/parsing/stringLiteralIndex/paramIndexingIsParam.chpl
A test/parsing/stringLiteralIndex/paramIndexingIsParam.future
A test/parsing/stringLiteralIndex/paramIndexingIsParam.good
A test/parsing/stringLiteralIndex/stringBytesLiteralIndex.chpl
A test/parsing/stringLiteralIndex/stringBytesLiteralIndex.good
A test/parsing/stringLiteralIndex/stringBytesLiteralIndexOOB1.chpl
A test/parsing/stringLiteralIndex/stringBytesLiteralIndexOOB1.good
A test/parsing/stringLiteralIndex/stringBytesLiteralIndexOOB2.chpl
A test/parsing/stringLiteralIndex/stringBytesLiteralIndexOOB2.good
M compiler/include/bison-chapel.h
M compiler/parser/bison-chapel.cpp
M compiler/parser/chapel.ypp
Compare: https://github.com/chapel-lang/chapel/compare/df875eaa88fb...5e691d171579