Changeset 505 for trunk/lib/Parser.cc


Ignore:
Timestamp:
Dec 6, 2007, 3:57:39 AM (14 years ago)
Author:
Peter Johansson
Message:

Fixes #270 - Changing the rule of what is code. Rather than requiring a line of code to contain a alhanumerical character, a line of code is required to contain a visible character (outside comment blocks).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Parser.cc

    r439 r505  
    130130        // A line of code or comment must contain at least one
    131131        // alphanumerical character.
    132         if (isalnum(*iter)) {
    133           if (!mode) {
    134             lt=code;
    135           }
    136           else if (lt!=code) {
    137             lt=comment;
    138           }
    139         }
     132        if (!mode && isgraph(*iter))
     133          lt=code;
     134        else if (mode && lt!=code && isalnum(*iter))
     135          lt=comment;
    140136      }
    141137      if (mode && codon[mode-1].second==std::string("\n"))
Note: See TracChangeset for help on using the changeset viewer.