var incode = this.lang == 'php' ? 0 : -1;
+
+
+
while (!stream.look().eof) {
continue;
}
}
+ if (this.read_shebang(stream, tokens)) continue;
+
if (this.read_mlcomment(stream, tokens)) continue;
if (this.read_slcomment(stream, tokens)) continue;
if (this.read_dbquote(stream, tokens)) continue;
if (this.read_newline(stream, tokens)) continue;
if (this.read_space(stream, tokens)) continue;
if (this.read_word(stream, tokens)) continue;
-
// if execution reaches here then an error has happened
tokens.push(new Token(stream.next(), "TOKN", "UNKNOWN_TOKEN", this.line));
}
}
return false;
},
+ /**
+ * read_shebang ( #!/usr/bin/seed
+ * @param {JSDOC.TokenStream} stream the text stream
+ * @param {Array} tokens
+ * @returns {Boolean} Was the token found?
+ */
+ read_shebang : function(/**JSDOC.TokenStream*/stream, tokens)
+ {
+ if (stream.cursor != 0) {
+ return false;
+ }
+
+ if (stream.look() == '#' && stream.look(1) == '!') {
+ while (stream.next() != "\n") { }; //eof?
+ return true;
+ }
+ return false;
+ },
+
/**
- * read_codestart (currently on PHP supported?)
+ * read_codeend (currently on PHP supported?)
* @returns {Boolean} Was the token found?
*/
- read_codestart : function(/**JSDOC.TokenStream*/stream, tokens)
+ read_codeend : function(/**JSDOC.TokenStream*/stream, tokens)
{
var found = '';
if (stream.look() == '?' && stream.look(1) == '>') {
},
/**
- * read_codeend (currently on PHP supported?)
+ * read_codestart (currently on PHP supported?)
* @returns {Boolean} Was the token found?
*/
- read_codeend: function(/**JSDOC.TokenStream*/stream, tokens) {
+ read_codestart : function(/**JSDOC.TokenStream*/stream, tokens) {
var found = '';
while (!stream.look().eof) {