# peek() is used to see if a '/' is followed by a '/' or '*'.
def mynext()
c = get
+ # saute les commentaires (également les lignes commencant pas ;;)
+
+ if (c == ";" and peek == ";")
+ while(true)
+ c = get
+ if (c[0] <= "\n"[0])
+ return c
+ end
+ end
+ end
if (c == "/")
- if(peek == "/")
+ prochain = peek
+ if(prochain == "/")
while(true)
c = get
- if (c <= "\n")
- return c
+ if (c[0] <= "\n"[0])
+ return c
end
end
end