I've been working on core.s2, the bottommost layer of S2 which defines all of the initial stuff which style authors, theme creators, translators and users will later extend and override. It's just taken me two hours to get my new core.s2 to compile, mostly due to me writing perl-style code when this language isn't that flexible! ( ;) ) but also due to odd behaviour in the compiler such as Null Pointer exceptions from the java string buffer doobrey and also the 'not' operator being broken.
Anyway, you can see my early core.s2 (and also the scary perl code it generates) if you want. It's got a lot commented out and a lot of FIXMEs after my long debugging/headsmacking session, but you should be able to see what I'm doing hopefully.
Just in case anyone was planning on it: don't start making layouts and other layers based on this yet, since I might have to change lots of stuff around as I port the system styles over (that's my next job) and you'll probably have to redo large parts of your layout if you do. I also have yet to do the userinfo and talkread/talkpost renderers nor design the classes for them, but they will come.
Oh, and Brad (or perhaps Evan?), can you perhaps answer some of my questions in the source and tell me how to deal with a bunch of the things I've marked
FIXME:? ;) It does seem reasonably important that I actually have some code in
As an aside, the HTML backend didn't mind my
return; lines, but both the S2 backend and the perl backend threw Null Pointer exceptions. I tried
return ""; but it then bitched that I was returning a string when it wanted a void! Also, the S2 backend isn't spitting out valid S2 code from my core.s2, and the HTML backend is neglecting to HTML escape some of my strings (triple-quote strings I think) and thus causing weird rendering in browsers. It also made a 1.9MB file from my core.s2! :)
Also, if you find any bugs in the S2 compiler first check the BUGS file. If it's not in there, make a minimal test case which highlights the bug (as a core layer) and mail it to me with an explanation of what you expected it to do and what it did.
I thought all the compiler issues were gone but it seems martmart found some... I'll look into those now.