applied a patch from @cremo to support MSVC

parent 02dba483
...@@ -3692,6 +3692,7 @@ parse_heredoc_line(parser_state *p) ...@@ -3692,6 +3692,7 @@ parse_heredoc_line(parser_state *p)
parser_heredoc_info *inf = parsing_heredoc_inf(p); parser_heredoc_info *inf = parsing_heredoc_inf(p);
/* assert(inf != NULL); */ /* assert(inf != NULL); */
int c; int c;
int line_head;
newtok(p); newtok(p);
while ((c = nextc(p)) != '\n') { while ((c = nextc(p)) != '\n') {
...@@ -3725,7 +3726,7 @@ parse_heredoc_line(parser_state *p) ...@@ -3725,7 +3726,7 @@ parse_heredoc_line(parser_state *p)
tokfix(p); tokfix(p);
p->lineno++; p->lineno++;
p->column = 0; p->column = 0;
int line_head = inf->line_head; line_head = inf->line_head;
inf->line_head = TRUE; inf->line_head = TRUE;
if (line_head) { if (line_head) {
/* check whether end of heredoc */ /* check whether end of heredoc */
...@@ -3765,6 +3766,7 @@ static int ...@@ -3765,6 +3766,7 @@ static int
parser_yylex(parser_state *p) parser_yylex(parser_state *p)
{ {
register int c; register int c;
int c2;
int space_seen = 0; int space_seen = 0;
int cmd_state; int cmd_state;
enum mrb_lex_state_enum last_state; enum mrb_lex_state_enum last_state;
...@@ -3931,7 +3933,7 @@ parser_yylex(parser_state *p) ...@@ -3931,7 +3933,7 @@ parser_yylex(parser_state *p)
(!IS_ARG() || space_seen)) { (!IS_ARG() || space_seen)) {
/* heredocument check */ /* heredocument check */
newtok(p); tokadd(p, '<'); tokadd(p, '<'); newtok(p); tokadd(p, '<'); tokadd(p, '<');
int c2 = nextc(p); c2 = nextc(p);
if (c2 == '-') { if (c2 == '-') {
tokadd(p, c2); tokadd(p, c2);
c2 = nextc(p); c2 = nextc(p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment