Changeset 5294


Ignore:
Timestamp:
12/31/03 19:41:06 (17 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/AsmFormatter.java

    r5289 r5294  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: AsmFormatter.java,v 1.2 2003-12-30 19:54:10 piso Exp $
     5 * $Id: AsmFormatter.java,v 1.3 2003-12-31 19:41:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2828public final class AsmFormatter extends Formatter
    2929{
    30     private static final UncheckedRE labelRE = new UncheckedRE("^[a-zA-z0-9_]+:");
     30    private static final UncheckedRE labelRE = new UncheckedRE("^[_a-zA-z0-9]+:");
    3131
    3232    private static final int ASM_FORMAT_TEXT    = 0;
     
    4545        if (text.length() > 0) {
    4646            int start = 0;
    47             int index = 0;
    48             REMatch match = labelRE.getMatch(text);
    49             if (match != null) {
    50                 index = match.getEndIndex();
    51                 addSegment(text, 0, index, ASM_FORMAT_LABEL);
    52                 start = index;
     47            int index = text.indexOf(':');
     48            if (index > 0) {
     49                REMatch match = labelRE.getMatch(text);
     50                if (match != null) {
     51                    index = match.getEndIndex();
     52                    addSegment(text, 0, index, ASM_FORMAT_LABEL);
     53                    start = index;
     54                }
    5355            }
    5456            index = text.indexOf(';', start);
Note: See TracChangeset for help on using the changeset viewer.