symbol.c: dotq in ripper
* symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
898fd2ed2a
commit
1a98528cb7
@ -1,3 +1,7 @@
|
|||||||
|
Sun Oct 25 10:12:05 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* symbol.c (op_tbl): add DOTQ for ripper. [Feature #11537]
|
||||||
|
|
||||||
Sat Oct 24 22:51:18 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
Sat Oct 24 22:51:18 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in: fixed build failure of Haiku.
|
* configure.in: fixed build failure of Haiku.
|
||||||
|
@ -257,6 +257,7 @@ static const struct token_assoc {
|
|||||||
{tRSHFT, O(op)},
|
{tRSHFT, O(op)},
|
||||||
{tSTAR, O(op)},
|
{tSTAR, O(op)},
|
||||||
{tDSTAR, O(op)},
|
{tDSTAR, O(op)},
|
||||||
|
{tDOTQ, O(op)},
|
||||||
{tSTRING_BEG, O(tstring_beg)},
|
{tSTRING_BEG, O(tstring_beg)},
|
||||||
{tSTRING_CONTENT, O(tstring_content)},
|
{tSTRING_CONTENT, O(tstring_content)},
|
||||||
{tSTRING_DBEG, O(embexpr_beg)},
|
{tSTRING_DBEG, O(embexpr_beg)},
|
||||||
|
2
symbol.c
2
symbol.c
@ -50,6 +50,7 @@ static ID register_static_symid_str(ID, VALUE);
|
|||||||
#define tCOLON2 RUBY_TOKEN(COLON2)
|
#define tCOLON2 RUBY_TOKEN(COLON2)
|
||||||
#define tANDOP RUBY_TOKEN(ANDOP)
|
#define tANDOP RUBY_TOKEN(ANDOP)
|
||||||
#define tOROP RUBY_TOKEN(OROP)
|
#define tOROP RUBY_TOKEN(OROP)
|
||||||
|
#define tDOTQ RUBY_TOKEN(DOTQ)
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
unsigned short token;
|
unsigned short token;
|
||||||
@ -75,6 +76,7 @@ static const struct {
|
|||||||
{tCOLON2, "::"},
|
{tCOLON2, "::"},
|
||||||
{tANDOP, "&&"},
|
{tANDOP, "&&"},
|
||||||
{tOROP, "||"},
|
{tOROP, "||"},
|
||||||
|
{tDOTQ, ".?"},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define op_tbl_count numberof(op_tbl)
|
#define op_tbl_count numberof(op_tbl)
|
||||||
|
@ -535,6 +535,8 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
|
|||||||
scan('op', ':[]')
|
scan('op', ':[]')
|
||||||
assert_equal ['[]='],
|
assert_equal ['[]='],
|
||||||
scan('op', ':[]=')
|
scan('op', ':[]=')
|
||||||
|
assert_equal ['.?'],
|
||||||
|
scan('op', 'a.?f')
|
||||||
assert_equal [],
|
assert_equal [],
|
||||||
scan('op', %q[`make all`])
|
scan('op', %q[`make all`])
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user