Changeset 2912


Ignore:
Timestamp:
Feb 25, 2013, 9:52:55 AM (6 years ago)
Author:
cameron
Message:

hexString optimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/cb_pablo.py

    r2911 r2912  
    291291def Parse_HexStrings(lex, marker, out_Callouts) :
    292292        hexString_starts = lex.LAngle &~ out_Callouts.mask
    293         hexString_ends = pablo.ScanThru(pablo.Advance(hexString_starts),lex.Hex|lex.WS)
    294         marker.error |= hexString_ends &~ lex.RAngle
    295         out_Callouts.hexString_mask = pablo.InclusiveSpan(hexString_starts,hexString_ends)
    296         out_Callouts.mask |= out_Callouts.hexString_mask
    297293        out_Callouts.hex_opener = hexString_starts
    298         marker.starts |= hexString_starts
    299         marker.ends |= hexString_ends
     294        out_Callouts.hexString_mask = 0
     295        if hexString_starts:
     296                hexString_ends = pablo.ScanThru(pablo.Advance(hexString_starts),lex.Hex|lex.WS)
     297                marker.error |= hexString_ends &~ lex.RAngle
     298                out_Callouts.hexString_mask = pablo.InclusiveSpan(hexString_starts,hexString_ends)
     299                out_Callouts.mask |= out_Callouts.hexString_mask
     300                marker.starts |= hexString_starts
     301                marker.ends |= hexString_ends
     302
    300303
    301304def Parse_Names(lex, marker, out_Callouts) :
Note: See TracChangeset for help on using the changeset viewer.