зеркало из https://github.com/github/ruby.git
ripper: Preprocess ripper-dispatchable types only
Keep the other types, which not having setter macros for ripper.
This commit is contained in:
Родитель
df316be401
Коммит
69d7871b02
|
@ -59,10 +59,9 @@ def prelude(f, out)
|
|||
when /\A%%/
|
||||
out << "%%\n"
|
||||
return
|
||||
when /\A%token/, /\A} <node>/
|
||||
out << line.sub(/<\w+>/, '<val>')
|
||||
when /\A%type/
|
||||
out << line.sub(/<\w+>/, '<val>')
|
||||
when /\A%token/, /\A%type/, /\A} <node>/
|
||||
# types in %union which have corresponding set_yylval_* macro.
|
||||
out << line.sub(/<(?:node|num|id)>/, '<val>')
|
||||
when /^enum lex_state_(?:bits|e) \{/
|
||||
lex_state_def = true
|
||||
out << line
|
||||
|
|
2
parse.y
2
parse.y
|
@ -1627,7 +1627,7 @@ static int looking_at_eol_p(struct parser_params *p);
|
|||
%type <id> f_kwrest f_label f_arg_asgn call_op call_op2 reswords relop dot_or_colon
|
||||
%type <id> p_kwrest p_kwnorest p_any_kwrest p_kw_label
|
||||
%type <id> f_no_kwarg f_any_kwrest args_forward excessed_comma nonlocal_var
|
||||
%type <ctxt> lex_ctxt begin_defined k_class k_module /* keep <ctxt> in ripper */
|
||||
%type <ctxt> lex_ctxt begin_defined k_class k_module
|
||||
%token END_OF_INPUT 0 "end-of-input"
|
||||
%token <id> '.'
|
||||
/* escaped chars, should be ignored otherwise */
|
||||
|
|
Загрузка…
Ссылка в новой задаче