Brad Fitzpatrick (bradfitz) wrote in lj_dev,
Brad Fitzpatrick
bradfitz
lj_dev

More S2 updates

Bunch of S2 stuff just went into CVS. Notable:

-- boolean literals (whoops... forgot those earlier)
-- constructors (without arguments)
-- regression test directory & runtests.pl tool
-- tons of updates & cleanup in s2lib.pl

From runtests.pl you should see how to make a runner. The entire test suite uses "main()" as the entry point when calling LJ::S2::run_code but it can be anything, including a object method (that's how it'll be when we're done) ... if you use run_code with an object method, the first argument has to be the '$this' hashref.

Current work is on making objects that can interpolate in strings (using something like Java's toString()). Also, though, I'm adding support to load an object from string data.. so fromString() essentially. This'll let us use such object as properties that the style configurator wizard can let people choose, so long as our configurator understands those types. So I guess fromString() is just a constructor with a string argument, but I don't think I'll be adding full constructor suppot... it's pretty pointless. The whole data structure will be passed in to begin with. This is a domain language, afterall.... it doesn't have to be fully general.

Words words. Back to programming. I'm just trying to program fast enough so I don't block martmart.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments