ksss
14767a5597
Not create local variables in scope_new
2014-06-25 05:52:07 +09:00
Yukihiro "Matz" Matsumoto
faa3c52a8d
Merge branch 'master' of github.com:mruby/mruby
2014-06-25 02:37:51 +09:00
Yukihiro "Matz" Matsumoto
9874aafbf0
Merge pull request #2333 from yui-knk/fix/dump
...
Fix to not print unnecessary comma.
2014-06-25 02:37:39 +09:00
Yukihiro "Matz" Matsumoto
5b590d977f
revert #2344 because of #2395
2014-06-25 02:36:02 +09:00
Yukihiro "Matz" Matsumoto
45e04c996e
clear local variables for the first execution of mrb_context_run(); close #2405
2014-06-21 18:24:26 +09:00
Yukihiro "Matz" Matsumoto
0042e586db
Merge pull request #2344 from yui-knk/fix-locals
...
Change to always use locals->car->car.
2014-06-14 01:03:39 +09:00
Jose Narvaez
6b642637b3
Fixed dead assignment in 'parser.y' reported by 'clang-analyzer'
2014-06-13 12:11:28 +01:00
Jose Narvaez
1a8e0ba4e8
Fixed dead assignment in 'parser.y' reported by 'clang-analyzer'
2014-06-13 12:11:23 +01:00
Jose Narvaez
a250050077
Fixed dead assignment in 'parser.y' reported by 'clang-analyzer'
2014-06-13 12:06:56 +01:00
Jose Narvaez
4027035cf4
Fixed dead assignment in 'parse.y' reported by 'clang-analyzer'
2014-06-13 09:37:07 +01:00
Yukihiro "Matz" Matsumoto
d75b84016c
do not ignore negative characters (e.g. EOF and partial EOF); fix #2361 fix #2369
2014-06-08 01:38:44 +09:00
Yukihiro "Matz" Matsumoto
a13e8f5ee1
revert #2368 due to #2369
2014-06-08 00:48:59 +09:00
take_cheeze
7f870f601f
Treat partial hook success '\n' to fix #2361 .
...
Now it will parse the #2361 code as:
```
module A
end
module B
end
```
instead of
```
module A
end module B
end
```
2014-06-06 21:29:42 +09:00
cremno
1a5841b4b1
use uppercase US-ASCII ctype macros
2014-06-05 21:00:47 +02:00
cremno
f9f864d4dd
don't (re-)define ascii_isspace and isascii
...
`ISSPACE` and `ISASCII` can be used instead.
2014-06-05 20:27:17 +02:00
cremno
69da21bcb4
ISSPACE evaluates its argument multiple times
2014-06-05 20:22:20 +02:00
yui-knk
b56a47cc38
Fix indent.
2014-06-03 16:29:42 +09:00
yui-knk
490d946bca
Remove space.
2014-06-03 16:29:42 +09:00
yui-knk
b5ef16ba03
Change to always use locals->car->car.
...
When p->locals->car is not NULL and p->locals->car->car is NULL,
local_add_f dose not append sym to p->locals->car->car.
This commit change to append sym to p->locals->car->car.
This will close #2333 .
2014-06-02 09:38:24 +09:00
yui-knk
c131f69d21
Remove space.
2014-05-31 14:10:30 +09:00
yui-knk
536697f41e
Fix to not print unnecessary comma.
...
When `n2->car` is 0 and `n2->cdd` is not 0,
unnecessary comma was printed before first local variables.
2014-05-31 14:00:30 +09:00
Yukihiro "Matz" Matsumoto
6bf1ee78c8
add internal function mrb_toplevel_run_keep() to keep stack contents; close #2326
2014-05-30 15:25:58 +09:00
yui-knk
5fd1eaec58
fix indent.
2014-05-27 08:48:12 +09:00
Jun Hiroe
665bc37288
Add new line behind return type
2014-05-16 22:46:41 +09:00
cremno
8876c059a7
fix memcpy-param-overlap
2014-05-05 04:07:54 +02:00
Nobuyoshi Nakada
8b13efc26d
count skipped line numbers
2014-05-03 08:42:32 +09:00
Nobuyoshi Nakada
cf3b880df6
skip to the next line and reset column after =end
2014-05-03 08:42:31 +09:00
Nobuyoshi Nakada
82fce52211
fix char after =end
...
skips() advance after the string skipped.
2014-05-03 08:42:31 +09:00
Nobuyoshi Nakada
854ae564a3
fix embedded documents
...
tabs are allowed after `=begin` and `=end`.
raise `SyntaxError` if no =end is found.
2014-05-03 08:42:31 +09:00
Nobuyoshi Nakada
69c6ff7aa0
fix condition for the rest of input
...
the input must rest the length of a string to be peeked at least.
fixes parse error at embedded documents by string eval, and `-e`
command line options.
2014-05-03 08:42:31 +09:00
Carson McDonald
b2f3919bc2
Accept =begin and =end with spaces after
2014-04-28 14:15:03 -04:00
Carson McDonald
af95acec17
make peek_n append p->pb to list
2014-04-28 14:11:18 -04:00
take_cheeze
215f8fdd64
Fix lineno overwrite in parser_init_cxt.
...
By reordering parsing string with mrb_parser_parse won't always start with line 1.
2014-04-25 21:56:02 +09:00
Nobuyoshi Nakada
ac6747a9c5
fix optional block arguments in rhs
...
define optional block arguments as argument variables in the rhs
default expressions, as same as mere assignment expressions.
Import ruby/ruby@01740f0c27
2014-04-21 14:55:06 +09:00
Nobuyoshi Nakada
28f6cfe424
adjust indent
2014-04-21 14:53:37 +09:00
Nobuyoshi Nakada
367118b1b6
fix optional arguments in rhs
...
define optional arguments as argument variables in the rhs default
expressions, as same as mere assignment expressions.
Import ruby/ruby@01740f0c27
2014-04-21 10:48:00 +09:00
Nobuyoshi Nakada
9eaddfab44
allow method definition in cmdarg
...
save cmdarg_stack and isolate command argument state from outer scope
to allow method definition in cmdarg
import from ruby/ruby@04bb9d6b75
2014-04-21 07:00:57 +09:00
Nobuyoshi Nakada
a3d6290d7b
use stack_type instead of raw unsigned int
2014-04-21 06:53:35 +09:00
Nobuyoshi Nakada
b16697982e
Allow parenthesed do-block in cmdarg
...
Flush cmdarg flags inside left-paren in a command argument, to allow
parenthesed `do-block` as an argument without arguments parentheses.
`CMDARG_PUSH(0)` for tLPAREN_ARG is before `CMDARG_PUSH(1)` in
`command_args` due to look-ahead.
2014-04-19 18:46:07 +09:00
take_cheeze
70f6aa0496
Fix wrong mrb_bug use found with mruby-clang-plugin.
2014-04-08 23:46:18 +09:00
Yukihiro "Matz" Matsumoto
5f2817b36c
backslash escapes in regexp should be addressed by Regexp processor; close #2005
2014-04-04 13:12:58 +09:00
Yukihiro "Matz" Matsumoto
9b45189626
remove some empty lines
2014-04-02 10:42:56 +09:00
Yukihiro "Matz" Matsumoto
911764e8e2
handle CR before LF; close #1781
2014-04-02 03:22:06 +09:00
Yukihiro "Matz" Matsumoto
3b339ed47f
simpler escape handling in ?c strings
2014-04-02 02:21:57 +09:00
Yukihiro "Matz" Matsumoto
5bcaa749fc
fix else indentation style
2014-04-02 02:16:09 +09:00
Yukihiro "Matz" Matsumoto
bfd2a539ed
add new function mrb_toplevel_run to prevent running through C function boudaries on exceptions; close #1942
2014-03-26 01:09:09 +09:00
chasonr
509cbc51eb
Implement \u notation for strings and regexes.
...
This change adds the \u notation for double quoted strings and regular
expressions. It does not implement the \u notation for character literals.
Both the \uNNNN and \u{NNNN} notations are supported.
\uNNNN is implemented by emitting equivalent UTF-8; that is, "\u4000" is
equivalent to "\xE4\x80\x80".
Unlike CRuby, the \u{NNNN} notation allows only one character per pair of
braces; I see no way to lift this restriction without remodeling the parser.
2014-03-23 21:46:00 -04:00
Yukihiro "Matz" Matsumoto
3e24e06b29
add a space after C reserved words
2014-03-18 23:57:29 +09:00
Yukihiro "Matz" Matsumoto
c476c1b528
symbol length type to be mrb_int
2014-03-15 15:43:40 +09:00
take_cheeze
52cf39a67a
remove deprecated register keyword
2014-03-11 22:01:00 +09:00