Comment blocks like rem..endrem

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Comment blocks like rem..endrem

Post by Shield »

I know, I'm not new to building compilers / parsing code.
But that's how it's implemented in all the big languages and that's what I don't like.
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Comment blocks like rem..endrem

Post by Tenaja »

The full text of that quote can be found on this page, along with full samples of nested, non nested, and multi-character comment handling. The nested comment handling also shows a great example of the use of recursion.

http://www.pp4s.co.uk/main/tu-trans-comp-jc-12.html
Post Reply