Commit Graph

45 Commits

Author SHA1 Message Date
h2so5 a258d5752a Improve checking for unterminated string in mirb 2013-04-06 20:32:48 +09:00
Yukihiro "Matz" Matsumoto 2ae47ddd09 parse_args should return either EXIT_SUCCESS or EXIT_FAILURE 2013-04-06 01:04:35 +09:00
Yukihiro "Matz" Matsumoto e72ac2c61f use EXIT_SUCCESS and EXIT_FAILURE for exit status; close #1142 2013-04-06 00:48:42 +09:00
Yukihiro "Matz" Matsumoto 82991049be replace non formatting printf to (f)puts 2013-03-27 23:53:56 +09:00
kano4 5a22c6daf7 Add simple usage message for mirb 2013-03-27 20:32:09 +09:00
kano4 201669d8a1 Fix indentation in mirb.c 2013-03-25 20:31:09 +09:00
FUKUZAWA-Tadashi 44fbfc5184 implement literal %W %w %s
refactor string parsing
2013-03-17 21:27:37 +09:00
Masaki Muranaka 3aa3b4af90 Remove stdlib.h from mruby.h. It is for portability (care for freestanding environments).
This is a first step. It will be reduced stdlib.h in each files later.
2013-03-16 21:29:39 +09:00
takkaw 839d801c7a display BasicObject information in mirb 2013-03-16 00:16:35 +09:00
kano4 d25af7ccf9 Add static declaration 2013-03-12 22:59:39 +09:00
FUKUZAWA-Tadashi 1af4110f7d implement heredoc 2013-03-03 20:08:13 +09:00
Carson McDonald fb5e83a69b Fix crash when exiting mirb using ctrl-d when compiled with readline
support.
2013-02-17 07:23:32 -05:00
Yukihiro Matz Matsumoto 600d4f9ed1 save/restore arena index in mirb; close #740 2013-01-16 18:38:53 +09:00
mattn 1d91470db6 use readline if it's enabled. 2012-12-28 02:22:26 +09:00
shtirlic 83ecb2f078 Fix compile warnings in mirb
Change last_char type to int
Warnings
mirb.c:174:7: warning: comparison is always false due to limited range of data type [-Wtype-limits]
warning: comparison is always false due to limited range of data type [-Wtype-limits]
2012-11-29 19:03:00 +04:00
Masaki Muranaka 4854f21c08 Remove some redundant memset(). 2012-09-05 02:56:32 +09:00
Masaki Muranaka a1876bc22b Reset last_code_line instead of ruby_code. 2012-09-05 02:50:34 +09:00
Yukihiro Matsumoto dabe3ca0c7 mirb would terminate on quit in the continuing line 2012-09-03 15:34:22 +09:00
Yukihiro Matsumoto 15725eb4f6 file/line info passed to codegen; argument type of mrb_generate_code() has changed 2012-08-22 22:36:44 +09:00
Joseph McCullough e7b61c65bb Don't exit if 'exit' or 'quit' are in quote blocks 2012-08-17 19:51:38 -05:00
Joseph McCullough 618f25bfe2 'exit' and 'quit' cause exit regardless of open block 2012-08-17 18:19:06 -05:00
Yukihiro Matsumoto 1ff6dfd081 should not leave open code on syntax errors; close #413 2012-08-01 17:52:14 +09:00
Yukihiro Matsumoto 6ea5c6b517 make mirb work even when DISABLE_STDIO is set 2012-07-17 23:46:48 +09:00
Yukihiro Matsumoto fc27f71289 add new function mrb_parser_free() 2012-07-03 21:52:11 +09:00
Yukihiro Matsumoto a1af20baa9 use mrbc_context; free parser for each iteration; close #312 2012-07-03 21:49:06 +09:00
Yukihiro Matsumoto a7b8a94e48 refactor mirb code 2012-07-03 21:29:46 +09:00
Yukihiro Matsumoto 39689441e7 add context arg to mrb_parser_parse() 2012-07-03 21:13:10 +09:00
Jon 2fff59dc86 Check mrb_open return value for NULL 2012-06-03 11:11:35 -04:00
Jon 44f2c59a61 Teach mirb another way to quit 2012-05-23 12:17:42 -04:00
Mitchell Blank Jr d1cd10421f change example code to do mrb_close()
I was hoping this would cause valgrind to complain less, but there is still
a lot of memory leaked (does mrb_close() actually free all of the managed
blocks?)  Anyway this helps somewhat and is good practice
2012-05-22 01:03:54 -07:00
Yukihiro Matsumoto d0a7b08303 mirb code termination policy changed 2012-05-19 22:20:16 +09:00
Yukihiro Matsumoto d10aec8aa9 mirb termination command renamed to quit 2012-05-19 22:10:46 +09:00
Yukihiro Matsumoto 7701795951 unterminated string detection made easy 2012-05-19 22:10:15 +09:00
Yukihiro Matsumoto 2ed31892a8 should initialize p->sterm every parse time 2012-05-19 17:52:41 +09:00
Yukihiro Matsumoto 04cafb7fb3 even smarter expression termination detection 2012-05-19 16:44:36 +09:00
Yukihiro Matsumoto 6f6c270bb1 mirb should detect end of expression smarter 2012-05-19 16:15:11 +09:00
Yukihiro Matsumoto 219162117a move compile.h to mruby/compile.h 2012-05-18 12:54:23 +09:00
Yukihiro Matsumoto 61d8bb132e keep toplevel local variables; close #133 2012-05-18 11:04:36 +09:00
Yukihiro Matsumoto 69c1b9b797 avoid c++ style comments 2012-05-12 23:47:09 +09:00
Yukihiro Matsumoto 2dcc0ab656 breaking newline before else 2012-05-12 23:44:31 +09:00
Yukihiro Matsumoto 260f41ed63 no #include unistd.h stdbool; close #124 2012-05-12 23:43:09 +09:00
Daniel Bovensiepen b3467ef4af Add additional hint to the code block guesser. 2012-05-12 00:59:18 +08:00
Daniel Bovensiepen 438042ffce Remove more unnecessary elements 2012-05-12 00:41:33 +08:00
Daniel Bovensiepen ab378085de Remove unnecessary elements 2012-05-12 00:38:58 +08:00
Daniel Bovensiepen 917d70e31b mirb - Embeddable Interactive Ruby Shell 2012-05-12 00:27:45 +08:00