Mercurial Hosting > luan
comparison src/luan/LuanSource.java @ 51:28dfd91a816c
various small issues
git-svn-id: https://luan-java.googlecode.com/svn/trunk@52 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 28 Dec 2012 20:43:06 +0000 |
parents | 64ecb7a3aad7 |
children | 54a61d1dc070 |
comparison
equal
deleted
inserted
replaced
50:272b6f1d7dac | 51:28dfd91a816c |
---|---|
18 public Element(LuanSource source,int start,int end) { | 18 public Element(LuanSource source,int start,int end) { |
19 if( source==null ) | 19 if( source==null ) |
20 throw new NullPointerException("source is null"); | 20 throw new NullPointerException("source is null"); |
21 this.source = source; | 21 this.source = source; |
22 this.start = start; | 22 this.start = start; |
23 while( Character.isWhitespace(source.text.charAt(end-1)) ) { | |
24 end--; | |
25 } | |
23 this.end = end; | 26 this.end = end; |
24 } | 27 } |
25 | 28 |
26 public String text() { | 29 public String text() { |
27 return source.text.substring(start,end); | 30 return source.text.substring(start,end); |