summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2014-02-09 18:35:20 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2014-02-09 18:35:20 +0900
commit19a08b8455c02eaef06d11cdc07b8011df6acd6d (patch)
tree5159549c6965c6ef10e4db7c6862999bdadcf7a5 /src/parse.y
parentd8a5f1205338f8ed664745ef74c825b74b9bb081 (diff)
parent4507985c3ea2b3a7d14745f1f432e544ddeafe93 (diff)
downloadmruby-19a08b8455c02eaef06d11cdc07b8011df6acd6d.tar.gz
mruby-19a08b8455c02eaef06d11cdc07b8011df6acd6d.zip
Merge pull request #1674 from cremno/mrb_bool-FALSE-TRUE
use mrb_bool, FALSE and TRUE more
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/parse.y b/src/parse.y
index 163c3ea55..f0e9369a9 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3319,8 +3319,8 @@ backref_error(parser_state *p, node *n)
}
}
-static int peeks(parser_state *p, const char *s);
-static int skips(parser_state *p, const char *s);
+static mrb_bool peeks(parser_state *p, const char *s);
+static mrb_bool skips(parser_state *p, const char *s);
static inline int
nextc(parser_state *p)
@@ -3383,7 +3383,7 @@ skip(parser_state *p, char term)
}
}
-static int
+static mrb_bool
peek_n(parser_state *p, int c, int n)
{
node *list = 0;
@@ -3405,7 +3405,7 @@ peek_n(parser_state *p, int c, int n)
}
#define peek(p,c) peek_n((p), (c), 0)
-static int
+static mrb_bool
peeks(parser_state *p, const char *s)
{
int len = strlen(s);
@@ -3426,7 +3426,7 @@ peeks(parser_state *p, const char *s)
return FALSE;
}
-static int
+static mrb_bool
skips(parser_state *p, const char *s)
{
int c;
@@ -3855,8 +3855,8 @@ heredoc_identifier(parser_state *p)
{
int c;
int type = str_heredoc;
- int indent = FALSE;
- int quote = FALSE;
+ mrb_bool indent = FALSE;
+ mrb_bool quote = FALSE;
node *newnode;
parser_heredoc_info *info;
@@ -5197,7 +5197,7 @@ mrb_parser_parse(parser_state *p, mrbc_context *c)
}
p->cmd_start = TRUE;
- p->in_def = p->in_single = FALSE;
+ p->in_def = p->in_single = 0;
p->nerr = p->nwarn = 0;
p->lex_strterm = NULL;
@@ -5227,7 +5227,6 @@ mrb_parser_new(mrb_state *mrb)
*p = parser_state_zero;
p->mrb = mrb;
p->pool = pool;
- p->in_def = p->in_single = 0;
p->s = p->send = NULL;
#ifdef ENABLE_STDIO
@@ -5235,9 +5234,9 @@ mrb_parser_new(mrb_state *mrb)
#endif
p->cmd_start = TRUE;
- p->in_def = p->in_single = FALSE;
+ p->in_def = p->in_single = 0;
- p->capture_errors = 0;
+ p->capture_errors = FALSE;
p->lineno = 1;
p->column = 0;
#if defined(PARSER_TEST) || defined(PARSER_DEBUG)