Permalink
Commits on Sep 17, 2012
  1. Revert "Add command line option for excluding files matching pattern."

    arvidj committed Sep 17, 2012
    Just found the built-in -f switch.
    
    This reverts commit 202eac0.
Commits on Sep 15, 2012
  1. no more DeriveTH

    dancor committed Sep 15, 2012
    should've-been-in / was-the-point-of the last commit.
    i can feel my mind slipping..
Commits on Sep 14, 2012
  1. switch from template haskell to binary-generic

    dancor committed Sep 14, 2012
    I thought this would help but full recompilation is still 57s for me.
    Maybe we need to split modules up more or kill the "deriving Generic" by
    going to the "deriving Data"-based pretty printer?
    
    In any case, we have removed a lot of lines of boilerplate code.
    And you don't have TH spewing things at you in compilation.
  2. toward no warnings

    dancor committed Sep 14, 2012
  3. Main -> Config still uses HSH

    dancor committed Sep 14, 2012
  4. invariants for everyone: NonEmpty lists in the AST

    dancor committed Sep 14, 2012
    some parts of the AST have a list structure that cannot be empty.  this
    is now an invariant in the type system.  there's a NonEmpty library on
    hackage, but it's small and doesn't currently seem into my grand vision
    of qualified importing to possibly have a lot of Data.List functionality.
    or maybe that's stupid.  we'll see what happens.
    
    also some cleanup here and trying to minimize the "Common" modules.
    
    also pulled out WS into a module (long overdue).
  5. Fixes #6; support PHP anonymous functions

    dancor committed Sep 14, 2012
    Well, I had to kill the module distinction between Expr and Stmt because
    now there is a cyclic dependency.
    To keep things manageable I split them up instead into Parse and Unparse.
    It seems like Haskell compilation time is O(n^2) of the largest module size
    or something.  StmtParse is still 800 lines which is too big, but I'm not
    sure how to break it up further..
    
    I made a few good simplifications too when I was adding anon functions and
    moving stuff.
    
    Tested on wordpress and:
    <?php
    function &(){} ;
    $a = function &($c=4) use ( $b ) {};
Commits on Sep 13, 2012
  1. Fixes #5; ternary operator without the second argument

    dancor committed Sep 13, 2012
    Tested w/ dump-ast-id on:
    
    <?php
    echo (2 ? : 4);
Commits on Sep 12, 2012
  1. Fixes #1; colon notation for "if" control structures.

    dancor committed Sep 12, 2012
    Added some things to help with testing.
    I've used GenericPretty to display AST tree structures in debugging.
    Unfortunately it requires "deriving Generic" and GHC.Generics.
    We're already "deriving (Data, Typeable)" which seems to be similar
    but not as GHC-only so probably better?  Have to look into.
    Also GenericPretty makes things too wide.  I played around with an
    alternative src/Test/PrettyPrint.hs but gave up on it for now..
    
    Also tested by running dump-as-id on wordpress, which now works until
    there's a "foreach .. :".  So I guess that's next.
Commits on Sep 9, 2012
  1. cp

    dancor committed Sep 9, 2012
  2. cp

    dancor committed Sep 9, 2012
  3. cp

    dancor committed Sep 9, 2012
  4. cp

    dancor committed Sep 9, 2012
  5. cp

    dancor committed Sep 9, 2012
  6. cp

    dancor committed Sep 9, 2012
  7. cp

    dancor committed Sep 9, 2012
  8. just work at bytelevel; no UTF8 "fixing" which breaks stuff

    dancor committed Sep 9, 2012
    tested with id on WordPress:
    ~ lex-pass id -s wp-includes/js/tinymce/plugins/spellchecker/rpc.php
  9. Revert "fix issues with unicode input"

    dancor committed Sep 9, 2012
    "time lex-pass -a no-ip" works, but
    "time lex-pass -a id" yells about "resource busy (file is locked)"
    
    This reverts commit fe512ef.
  10. Merge pull request #8 from arvidj/issue/4-late-static-binding

    dancor committed Sep 9, 2012
    Issue/4 late static binding
  11. Merge pull request #7 from arvidj/issue/3-namespaces

    dancor committed Sep 9, 2012
    Issue/3 namespaces
  12. #3, Add support for namespaces.

    arvidj committed Sep 9, 2012
    Add support for the namespace and the use statement, and allow the namespace separator in identifiers.
Commits on May 14, 2012
  1. fix issues with unicode input

    tdudziak committed May 14, 2012
  2. update to use parsec-3

    tdudziak committed May 14, 2012
Commits on Jul 6, 2010
  1. normedStrUnitIsRegexUnmetaEvenEscaped was never needed

    dancor committed Jul 6, 2010
    never ended up using this; realized alphanumeric-ness was the key
  2. for php regex, an escaped char is meta iff the char is alphanumeric

    dancor committed Jul 6, 2010
    and even though '\\0' in particular has no real use,
    it won't match as unmeta:
    php> =preg_split('/a\\#/', 'yyya#zzz')
    array(
      0 => "yyy",
      1 => "zzz",
    )
    php> =preg_split('/a#/', 'yyya#zzz')
    array(
      0 => "yyy",
      1 => "zzz",
    )
    php> =preg_split('/a\\0/', 'yyya0zzz')
    array(
      0 => "yyya0zzz",
    )
    php> =preg_split('/a0/', 'yyya0zzz')
    array(
      0 => "yyy",
      1 => "zzz",
    )
    
    Test Plan:
    $bits = preg_split('/[.@]/', $elattr, 2);
    $bits = preg_split('/\[\.@]/', $elattr, 2);
    $bits = preg_split('/\[\.@\]/', $elattr, 2);
Commits on Jul 5, 2010
  1. preg_split("//", ..) -> str_split(..)

    dancor committed Jul 5, 2010
    Test Plan:
    preg_split("//", /*lol*/"AAAl\\.l\xffBBB");
    ->
    str_split(/*lol*/"AAAl\\.l\xffBBB");