Changeset 3836
- Timestamp:
- 09/17/03 00:03:20 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/LispTagger.java
r1735 r3836 3 3 * 4 4 * Copyright (C) 1998-2003 Peter Graves 5 * $Id: LispTagger.java,v 1.1 0 2003-05-07 15:55:47piso Exp $5 * $Id: LispTagger.java,v 1.11 2003-09-17 00:03:20 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 82 82 } 83 83 if (c == '(') { 84 if (state != DEFINITION) 85 state = OPEN_PAREN; 84 if (state == DEFINITION) { 85 Position tokenStart = pos.copy(); 86 String name = gatherList(pos); 87 addTag(name, tokenStart, definer); 88 state = NEUTRAL; 89 definer = null; 90 continue; 91 } 92 state = OPEN_PAREN; 86 93 pos.next(); 87 94 continue; … … 148 155 } 149 156 157 // Advances pos past list. 158 private String gatherList(Position pos) 159 { 160 FastStringBuffer sb = new FastStringBuffer(); 161 char c = pos.getChar(); 162 Debug.bugIf(c != '('); 163 if (pos.next()) { 164 while ((c = pos.getChar()) != ')') { 165 sb.append(c); 166 if (!pos.next()) 167 break; 168 } 169 } 170 return sb.toString(); 171 } 172 150 173 // Advances pos past token. 151 174 private String gatherToken(Position pos)
Note: See TracChangeset
for help on using the changeset viewer.