diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-25 17:06:29 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-25 17:06:29 +0000 |
| commit | 38d4d63578a176f3c67715fbadd250dfd7b05106 (patch) | |
| tree | db59455f8c2b5ad54157e033b847df9da88b421a /parse.y | |
| parent | 582aa38894376a83f2060dd634d6610e6758774d (diff) | |
| download | ruby-38d4d63578a176f3c67715fbadd250dfd7b05106.tar.gz ruby-38d4d63578a176f3c67715fbadd250dfd7b05106.tar.xz ruby-38d4d63578a176f3c67715fbadd250dfd7b05106.zip | |
* parse.y (parser_yylex): dot at the head of the line denote line
continuation from previous one to support fluent interface.
[experimental]
* misc/ruby-mode.el (ruby-calculate-indent): support fluent dot.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
| -rw-r--r-- | parse.y | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -5863,6 +5863,25 @@ parser_yylex(struct parser_params *parser) default: break; } + while ((c = nextc())) { + switch (c) { + case ' ': case '\t': case '\f': case '\r': + case '\13': /* '\v' */ + space_seen++; + break; + case '.': { + if ((c = nextc()) != '.') { + pushback(c); + pushback('.'); + goto retry; + } + } + default: + pushback(c); + goto normal_newline; + } + } + normal_newline: command_start = Qtrue; lex_state = EXPR_BEG; return '\n'; |
