Changeset e778b278bdac7b0f65236bcdaf2e84a670148de8
- Timestamp:
- 06/04/2008 11:45:55 AM
(7 months ago)
- Author:
- mitchell <mitchell@frost.(none)>
- git-committer:
- mitchell <mitchell@frost.(none)> 1212605155 -0400
- git-parent:
[fcb57d7a8b5a6803e6cd63147bceebed67c1d518]
- git-author:
- mitchell <mitchell@frost.(none)> 1212605155 -0400
- Message:
Fixed MATLAB parser and unit tests to include GNU Octave comments.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rad3c972 |
re778b27 |
|
| 45 | 45 | } |
|---|
| 46 | 46 | |
|---|
| 47 | | matlab_line_comment = '%' [^{] @{ fhold; } @comment nonnewline*; |
|---|
| | 47 | # note: the '#' comment is for GNU Octave |
|---|
| | 48 | matlab_line_comment = ('%' [^{] @{ fhold; } | '#') @comment nonnewline*; |
|---|
| 48 | 49 | matlab_block_comment = |
|---|
| 49 | 50 | '%{' @comment ( |
|---|
| rdf3686a |
re778b27 |
|
| 6 | 6 | lb = [Ohcount::LanguageBreakdown.new("matlab", "", "%comment", 0)] |
|---|
| 7 | 7 | assert_equal lb, Ohcount::parse(" %comment", "matlab") |
|---|
| | 8 | end |
|---|
| | 9 | |
|---|
| | 10 | def test_octave_syntax_comment |
|---|
| | 11 | lb = [Ohcount::LanguageBreakdown.new("matlab", "", "#comment", 0)] |
|---|
| | 12 | assert_equal lb, Ohcount::parse(" #comment", "matlab") |
|---|
| 8 | 13 | end |
|---|
| 9 | 14 | |
|---|