Skip to content
Snippets Groups Projects
Commit 7e8801fa authored by Vasileios Karakasis's avatar Vasileios Karakasis
Browse files

Support for comments starting with '?'

parent 3d89ddcd
No related branches found
No related tags found
No related merge requests found
: sample file : sample file
? another style of comments
NEURON { NEURON {
THREADSAFE THREADSAFE
...@@ -26,7 +27,7 @@ PARAMETER { ...@@ -26,7 +27,7 @@ PARAMETER {
gkbar = 0.1 (mho/cm2) gkbar = 0.1 (mho/cm2)
celsius celsius
ek = -100 (mV) : must be explicitly def. in hoc ek = -100 (mV) : must be explicitly def. in hoc
v (mV) v (mV) ? another style of comment
vhalfm =-43 (mV) vhalfm =-43 (mV)
km =8 km =8
vhalfh =-67 (mV) vhalfh =-67 (mV)
......
...@@ -78,8 +78,9 @@ Token Lexer::parse() { ...@@ -78,8 +78,9 @@ Token Lexer::parse() {
location_.line++; location_.line++;
continue; // skip to next line continue; // skip to next line
// comment (everything after : on a line is a comment) // comment (everything after : or ? on a line is a comment)
case ':' : case ':' :
case '?' :
// strip characters until either end of file or end of line // strip characters until either end of file or end of line
while( !is_eof(*current_) && *current_ != '\n') { while( !is_eof(*current_) && *current_ != '\n') {
++current_; ++current_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment