projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a29f04c
)
JSDOC/TextStream.vala
author
Alan Knowles
<alan@roojs.com>
Thu, 10 Sep 2015 09:49:50 +0000
(17:49 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 10 Sep 2015 09:49:50 +0000
(17:49 +0800)
JSDOC/TextStream.vala
patch
|
blob
|
history
diff --git
a/JSDOC/TextStream.vala
b/JSDOC/TextStream.vala
index
cc0c364
..
599ed8b
100644
(file)
--- a/
JSDOC/TextStream.vala
+++ b/
JSDOC/TextStream.vala
@@
-29,18
+29,20
@@
namespace JSDOC {
this.cursor = 0;
}
this.cursor = 0;
}
- public TextStreamChar look(int n = 0) {
-
+ public char look(int n = 0, out bool eof)
+ {
+ eof = false;
if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
if (this.cursor+n < 0 || this.cursor+n >= this.text.length) {
- return new TextStreamChar('\0', true);
+ eof = true;
+ return '\0';
}
}
- return
new TextStreamChar(this.text[this.cursor+n], false)
;
+ return
this.text[this.cursor+n]
;
},
},
- public
TextStreamChar? next(int n = 1
)
+ public
char next(int n = 1, out bool eof
)
{
{
-
+ eof = false;
if (n < 1) {
return null;
}
if (n < 1) {
return null;
}
@@
-50,13
+52,16
@@
namespace JSDOC {
if (this.cursor+i < this.text.length) {
pulled += this.text.charAt(this.cursor+i);
} else {
if (this.cursor+i < this.text.length) {
pulled += this.text.charAt(this.cursor+i);
} else {
- return new TextStreamChar('\0', true);
+ eof =true;
+ return '\0';
+
}
}
this.cursor += n;
}
}
this.cursor += n;
- return
new TextStreamChar(pulled, false)
;
+ return
pulled
;
}
}
- });
\ No newline at end of file
+ }
+}
\ No newline at end of file