nickbabcock / Pdoxcl2Sharp

A Paradox Interactive general file parser
MIT License
39 stars 13 forks source link

Add NextIsBracketed Funcion. #24

Closed Measter closed 10 years ago

Measter commented 10 years ago

This adds the capability of peeking for whether the current tag's data is bracketed.

nickbabcock commented 10 years ago

Hey, awesome implementation. I noticed that you commented that you didn't want to break DoWhileBracket, but that actually might change due to #23, but you don't have to worry about anything. Just want to make you aware of it.

I'll merge this manually in a bit.

Measter commented 10 years ago

Thanks. The way NextIsBracketed() is now implemented, it doesn't interact with the current token, indent, or character, so the state won't be altered. As far as I can figure, as long as you don't remove things from the nextChars queue outside of ReadNext() it shouldn't interfere with anything.

[Edit] I just thought of an issue with the code: Bad handling of spaces. I've updated the fork, but basically on line 692 replace temp = ' ' with IsSpace(tempChar).

nickbabcock commented 10 years ago

Haha, just saw your edit, I'll apply it.

nickbabcock commented 10 years ago

On a sidenote, I noticed that you commit with an email that isn't associated with your Github account, so you're not going to be considered as a contributor according to Github. just thought I'd let you know in case that bothered you.