From 97177a2d99f7c38d6085ccba343a980031aec7cf Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 Apr 2016 01:25:55 +0000 Subject: refactor syntax error * compile.c (append_compile_error): use rb_syntax_error_append. * error.c (rb_syntax_error_append): append messages into a SyntaxError exception instance. * parse.y (yycompile0): make new SyntaxError instance in main mode, otherwize error_buffer should be a SyntaxError if error has occurred. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index 126410796e..f3767110cc 100644 --- a/internal.h +++ b/internal.h @@ -852,6 +852,7 @@ extern VALUE rb_eEWOULDBLOCK; extern VALUE rb_eEINPROGRESS; void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args); PRINTF_ARGS(void rb_compile_error_str(VALUE file, int line, void *enc, const char *fmt, ...), 4, 5); +VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list); VALUE rb_check_backtrace(VALUE); NORETURN(void rb_async_bug_errno(const char *,int)); const char *rb_builtin_type_name(int t); -- cgit v1.2.3