Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basically a full rewrite #29

Merged
merged 27 commits into from
Sep 8, 2021
Merged

basically a full rewrite #29

merged 27 commits into from
Sep 8, 2021

Commits on Aug 17, 2021

  1. rewrite Makefile

    otommod committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    d27514b View commit details
    Browse the repository at this point in the history
  2. fix comments

    otommod committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    b80436a View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2021

  1. remove unneeded choice()s

    otommod committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    2ccbab9 View commit details
    Browse the repository at this point in the history
  2. cosmetic changes

    otommod committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    b4906f5 View commit details
    Browse the repository at this point in the history
  3. remove custom scanner

    otommod committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    6d01e54 View commit details
    Browse the repository at this point in the history
  4. fix varargs

    otommod committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    1c72adf View commit details
    Browse the repository at this point in the history
  5. fix strings

    An escaped backspace just before the closing quote would be recognized
    as an escaped quote and the rest of your program becomes a giant string.
    
    Fennel on its own doesn't really deal with escape sequences, but the
    underlying Lua platform does.  We can't really know its version so we
    just support the latest, 5.4.
    otommod committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    8240f73 View commit details
    Browse the repository at this point in the history
  6. generalize some rules

    otommod committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    c743dbe View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2021

  1. fix numbers

    Numbers can start or end on just a dot (.003, 100.)
    
    Fixing just that would be boring, so here's some new features:
    * hexadecimal literals: 0xdeadbeef
    * exponents, decimal and hexadecimal: 1e10, 0x1p10
    * underscores as numerical separators: 1_000.000_03
    
    The first two are Lua features.  Hexadecimal integer literals were
    introduced in Lua 5.1 and hexadecimal float literals in Lua 5.2.  There
    have been no further additions up to Lua 5.4.
    
    The last feature is all Fennel and it's pretty insane.  For example,
    here are some ways to represent the number 32:
    * 0x20
    * 0x10p1
    * +_0_x_1_0_p_+_1
    
    The last one doesn't even look like a number.  For my own sanity, I
    only allow underscores between digits and not directly after the dot,
    the exponent "character" (the 'e', 'E', 'p', 'P') or any sign.
    otommod committed Aug 20, 2021
    Configuration menu
    Copy the full SHA
    2c88c59 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2021

  1. rename some rules

    otommod committed Aug 21, 2021
    Configuration menu
    Copy the full SHA
    c467c02 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2021

  1. fix identifiers

    Not really broken but there's definitely more characters we can allow.
    In fact, we allow everything!  With some exceptions.
    otommod committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    b74c14d View commit details
    Browse the repository at this point in the history
  2. fix field_expression

    I only noticied this by chance: `(foo. bar . baz)` would get parsed as a
    single `field_expression`, because of how `seq()`s work.
    otommod committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    75b5324 View commit details
    Browse the repository at this point in the history
  3. add methods

    We can use the same technique as with `field_expression`s to correctly
    parse methods and only methods.  We need to set a higher precedence on
    the colon specifically to "overpower" `field`
    otommod committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    bdac1d2 View commit details
    Browse the repository at this point in the history
  4. remove field

    There is no reason for it to be a separate rule.
    otommod committed Aug 22, 2021
    Configuration menu
    Copy the full SHA
    1dcaa8b View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2021

  1. Configuration menu
    Copy the full SHA
    0a662cd View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2021

  1. fix quote

    Any quoted special form loses its special meaning, recursively.
    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    b50647d View commit details
    Browse the repository at this point in the history
  2. more renames

    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    b76fcd4 View commit details
    Browse the repository at this point in the history
  3. add destructuring

    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    414cb3d View commit details
    Browse the repository at this point in the history
  4. add destructuring on each

    Our first conflicts!  The alternative would be to add precendece in all
    the binding rules and I don't really want to do that.
    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    59ed869 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3658ad0 View commit details
    Browse the repository at this point in the history
  6. one last renaming

    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    979e4b7 View commit details
    Browse the repository at this point in the history
  7. add function docstrings

    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    fd989dd View commit details
    Browse the repository at this point in the history
  8. add match again

    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    71bcc26 View commit details
    Browse the repository at this point in the history
  9. remove many special forms

    If they just take statements they're not really worth their own rule.
    otommod committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    a5907aa View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2021

  1. fix comments inside strings

    ";" would get parsed as a string with only its starting quote and then a
    comment.  The ending quote would not be found and all the rest of your
    program is a string.
    
    I though `token.immediate` was supposed to not allow...
    otommod committed Aug 29, 2021
    Configuration menu
    Copy the full SHA
    9ab6464 View commit details
    Browse the repository at this point in the history
  2. add old match pattern syntax

    It is still supported and used in the Fennel compiler
    otommod committed Aug 29, 2021
    Configuration menu
    Copy the full SHA
    f57cc57 View commit details
    Browse the repository at this point in the history
  3. remove keywords and operators

    They're just symbols.
    
    However, they are symbols with dots in them (at least `.` and `..` are).
    Yet, they're not multisyms either.  Indeed, a symbol that begins or ends
    on a dot is not a multisym.
    
    I managed to get the starting dots working.  Unfortunately, I can't get
    a symbol to only end on a dot without completely breaking
    `multi_symbol`.  So, no `?.` for you. :(
    otommod committed Aug 29, 2021
    Configuration menu
    Copy the full SHA
    785c415 View commit details
    Browse the repository at this point in the history