summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby/patterns.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix spaces around operators (RuboCop)Kornelius Kalnbach2019-11-241-1/+1
|
* don't ruin indentationKornelius Kalnbach2016-02-131-1/+1
|
* add support for Ruby 2.3 squiggly heredocruby-2.3Kornelius Kalnbach2016-02-131-1/+1
|
* add Ruby 2 syntax: %i(…) and %I(…)Kornelius Kalnbach2013-07-201-1/+4
|
* Merge pull request #113 from rubychan/fix-ruby-unicodeKornelius Kalnbach2013-02-171-3/+3
|\ | | | | Improve support for Unicode non-alphanumeric characters in Ruby names
| * improve support for Unicode non-alphanumeric characters in Ruby namesKornelius Kalnbach2013-02-171-3/+3
| |
* | whitespaceKornelius Kalnbach2013-02-171-15/+15
|/
* changed :reserved to :keyword in Ruby scanner (issue #43)murphy2011-06-161-2/+2
|
* renamed pre_* token kinds to predefined_*murphy2011-04-171-1/+1
|
* lots of fixes and improvements to the Ruby scannermurphy2011-03-071-82/+15
|
* Improved Ruby scanner (see #147 and Changes.textile.)murphy2010-03-311-24/+28
|
* Cleanups.murphy2009-12-301-2/+2
|
* Copying changes and fixes for 0.9.0rc3 from terminal-encoder branch over to ↵murphy2009-12-281-2/+2
| | | | trunk.
* Updated Ruby scanner:murphy2009-10-191-15/+21
| | | | | | | * cleanup (FIXMEs, dead code, comments) * improved value_expected detection using VALUE_EXPECTING_KEYWORDS * support for self.method style definitions
* Improved UTF-8 support for Ruby Scanner. Also fixed a minor bug.murphy2009-06-071-4/+4
| | | | | | | | | * closes #108 (new Ruby 1.9 call operator syntax sugar) * Added an example for unicode code. * automatic UTF-8 detection (experimental) * Still problems with different Ruby versions; new unicode test fails in Ruby 1.9 and JRuby.
* Ruby scanner: Even more fixes for control and meta escape sequences.murphy2009-02-061-9/+14
| | | | | * I think I got it right this time.
* Ruby scanner: Fixed rarely used \c, \C-, and \M- escape sequences.murphy2009-02-051-1/+1
| | | | | | | * JavaScript scanner: elaborate a comment * SimpleRegexpScanner: Just some testing with the Ruby stack. * coderay-lib.tmproj: I should just remove it from the repo...
* JRuby fixes.murphy2008-12-251-2/+3
|
* [KK] Just a little code cleanup and new task 187.murphy2008-07-291-1/+1
|
* Improved Ruby scanner to use +/- signs only when appropriate (tests adjusted.)murphy2008-01-211-7/+6
| | | | | Ignore test/scanners/*/*.expected.html
* Lib:murphy2008-01-071-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Encoder: removed a warning - Encoders::HTML: don't shadow outer variable - Plugin: move require_plugin into class namespace - Ruby Scanner: - "alias" keyword recognition - better regexp/division distinction - recognize ~, !, !=, and !~ as method names (partly Ruby 1.9 only) - reordered states for speed Tests: - updated coderay-suite to use gem instead of require_gem - general improvements (more colors!, new parameter: new, new syntax lang.test for only and new) - fixed ruby suite - adjusted a lot of Ruby tests (alias uses methods now) - new tests: ruby/operators, ruby/regexp Samples: - fixed/updated ('bout time) Rake tasks: - updated to use new rubygems API
* Done:murphy2007-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General: - Declared version 0.7.6. - Moved WordList, CaseIgnoringWordList, Plugin, PluginHost and FileType into CodeRay namespace. CodeRay should be "clean" now, except for the String#to_unix helper function. - Fixed a bit of documentation. - CodeRay binary: Prepare for streaming switch. Scanners: - Added code= alias for string=. - Added streaming? method: Is this Scanner in streaming mode? - Enhanced error info a bit. - Ruby scanner: - Highlights Regexp heredocs now. They may be added to Ruby 1.9. - Speedups with better support for Ruby 1.9. - Change in whitespace handling (faster and cleaner now.) - Speed up some operator recognition (saving two string comparisons). - Declared C and Plaintext Scanners as Streamable. Tokens: - Changed Text/Block token recognition (#is_a? ::String for Ruby 1.9 support). - New method: Tokens#text yields the code string. - text_size fixed. - Token kind shortcuts (like r for reserved) are now defined in token_classes.rb (instead of encoders/html/classes.rb). Encoders: - Debug Scanner added. - Base encoder class adds to @out when encoding (if @out is set). - A little Tokens scanner speedup. - Text encoder uses text_token. - Statistic encoder counts block tokens. - Smaller changes in XML and HTML encoders. Styles: - cYcnus style defines a debug class now. Duo: - scanner and encoder are now methods. Scanner and Encoder are created (and cached) when needed, not earlier. - Documented. Tests: - Disabled encoder and scanner list check (breaks too often). - Added identity test, which checks if tokens#text matches the input. - Added nocolor switch. Developer tools: - Benchmark uses Encoder#file_extension for output now. - Rakefile: Support for 19, 18, yarv and ruby switches for easy comparing different Ruby versions. - Statistic: Demos are no longer tests.
* Fixed warning in bench.rb.murphy2006-10-181-0/+13
| | | | | | | | | | Ruby Scanner: improved handling of ambiguos values. - operator methods are now :ident instead of :operator - fancy_allowed and regexp_allowed are now value_expected - value_expected works in operator method calls - tests enhanced and adjusted Scanner tests: new diffed option, diff doesn't imply noassert anymore
* Fixed functional test.murphy2006-10-181-1/+2
| | | | | | | Fixed Ruby scanner (/= was scanned as regexp!) Made bench.rb run from any folder. Made scanner test diff function work via EDITOR instead of gvimdiff.
* rake test now runs in debug mode.murphy2006-07-111-216/+216
| | | | All .rb files converted to UNIX format (where did the \r come from?)
* Big re-indenting - no more tabs!murphy2006-07-101-7/+7
|
* Fixed another bug in the Ruby scanner, this time it was unfinished heredocs ↵murphy2006-07-091-210/+210
| | | | | | with empty delimiter. Fixed documentation uploading.
* Re-indented everything. Sorry to break the blame chain.murphy2006-04-161-7/+5
|
* styles/_map.rb added. :cycnus is now default style. html/css.rb adjusted.murphy2006-04-151-3/+7
| | | | | | | | | | ROADMAP and TODO updated. Ruby scanner: Fixed a bug: Fancy strings don't allow \w delimiters. They _do_ also allow whitespace delimiters, but adding this would cause many scan errors. So I leave this bug unfixed.
* Large update: Scanners for HTML, RHTML and Nitro-XHTML added.murphy2006-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | CSS style changes/enhancments (mainly the new background color for inline code, affects all Ruby code.) Demos and tests adjusted. Plugin: new PluginHost::default method. Scanner: - New setup method - ability to re-use a scanner - ability to keep the tokens - minor changes to token caching and string flattening Encoder: Error if token content is neither String nor Symbol. HTML encoder: - more warnings for unclosed tokens - output now UTF-8 Ruby Scanner: - bug: symbols before => now do not include =; {:foo=>bar} is valid Ruby code - try to close all open tokens - constants now all with specific namespace (for speed, I hope) Styles: new :entity/en class. Test suite now gives hinted HTML output.
* Added HTML scanner!murphy2006-04-041-4/+5
| | | | | | | Added test/html/suite.rb and tolkien.in.html test. Benchmark produces inline line numbers now. Minor changes to Ruby and C scanners. Rakefile: unit tests now in -d mode.
* Deleted silly debug print.murphy2006-03-151-1/+1
|
* Ruby scanner fixed - nasty bug in ruby/patterns.rb.murphy2006-03-151-7/+7
| | | | | besetzung.in.rb test added. highlight.rb updated.
* scanners/ruby/patterns.rb:murphy2005-12-111-1/+1
| | | | | | | | Changed recognition of numerics + and - prefixes now belong to the number. tests and demos adjusted. helpers/plugin.rb: Typo in doc.
* Plugin System extended:murphy2005-12-101-0/+213
- helper method - path names are expanded encoders/html.rb, div.rb, span.rb, ruby.rb: - using new methods (fixes problems with rdoc and test tasks): renamed scanners/ruby/helper.rb to patterns.rb encoders/statistic.rb: sorting made deterministic (for unit testing)