Skip to content
Snippets Groups Projects
  1. Aug 26, 2017
    • Michael Aaron Murphy's avatar
      Enhance Assignment Parsing · fab14ab9
      Michael Aaron Murphy authored
      There are some breaking changes with this new commit, so existing users of Ion should carefully review these changes.
      
      Namely, at the moment the ability to perform argument swapping with the let command isn't functioning, due to some
      changes to how the assignment parsing happens. I will probably bring this feature back soon, but for now it will not
      work because the new assignment parsing is evaluating expressions without performing any sort of heap allocations.
      
      Each key / value pair are now parsed one at a time, which is what made it possible to implement this without any
      heap allocations. It is also the cause of the breaking change with swapping values.
      
      It also causes another breaking change: you can't evaluate an array and have each element in the array distributed
      to arguments on the left hand side. Instead, your arguments should be properly separated by spaces. When an array is
      detected, then whichever variable corresponds on the left hand side will receive the entire array and be initialized
      as an array, unless otherwise specified.
      
      But what we have now gained are a significant degree of flexibility in mixing arrays among variables, among specifying
      types to enable some type checking. Type checking is currently very limited though, but will soon encompass all of the
      following:
      
      - []
      - str
      - str[]
      - int
      - int[]
      - bool
      - bool[]
      - float
      - float[]
      
      At some point, this may even be expanded to also support:
      
      - int128
      - float128
      - uint
      - uint128
      
      There's also a question of whether we should roll back prior assignments when an assignment fails. Currently, I just
      have the behavior set to retain prior successful assignments, but cancelling all future assignments, should there
      be an error with setting values, such as an invalid type.
      
      let a:str b c = [one two three] for five
      
      The above should cause a type error because first variable demands to be a string and not an array. The b and c
      variables are thus not set at all.
      fab14ab9
  2. Aug 23, 2017
    • Michael Aaron Murphy's avatar
      Implement Ion Docs Launch Support · ffd7efde
      Michael Aaron Murphy authored
      - We now have a setup.ion script for performing more advanced setup/installations.
      - If the documentation is installed, it is accessible via the ion-docs builtin.
      - This requires that the user specifies a BROWSER variable
      - Fixed a bug with the quote terminator
      ffd7efde
  3. Aug 17, 2017
  4. Aug 02, 2017
  5. Jul 31, 2017
  6. Jul 30, 2017
  7. Jul 29, 2017
  8. Jul 28, 2017
  9. Jul 27, 2017
  10. Jul 21, 2017
  11. Jul 19, 2017
  12. Jul 18, 2017
  13. Jul 17, 2017
  14. Jul 15, 2017
  15. Jul 14, 2017
  16. Jul 13, 2017
  17. Jul 01, 2017
  18. Jun 29, 2017
    • Hunter Goldstein's avatar
      Introduce a match-case construct to Ion's grammar (#351) · 026177e5
      Hunter Goldstein authored and Michael Aaron Murphy's avatar Michael Aaron Murphy committed
      * [WIP] Add a rudimentary match statement to the language
      
      * Parsing a match construct now correctly resumes on new line
      
      Before, parsing a match construct would depend on all parts of the match
      statement being in one piece, it can now accept it over multiple
      invocations of `on_command`
      
      * Match statement now forwards all conditions
      
      * Most errors are copy / paste errors
      
      * Finish comment, remove useless continue
      
      * case values are now unquoted string literals
      
      * Added example for match
      
      * case expressions are now arbitrary commands
      
      The values in case branches can now be arbitrary commands that work off
      set intersection (for now). For example, the case:
      ```
      case @(seq 0 10)
      ```
      would match any number from 0 to 10. Additionally, alternation can be
      done through an array, like so:
      ```
      match $filetype
        case ["image/jpeg" "image/png"]
        ...
        end
      end
      ```
      
      * Remove XXX referencing shorthand
      026177e5
  19. Jun 25, 2017
    • Michael Aaron Murphy's avatar
      Implement Explicit Array Assignments · b7a93117
      Michael Aaron Murphy authored
      In order to create an array with the let command, arrays must be wrapped within [ and ] characters, like so:
      
      let array = [ 1 2 3 ]
      let copy_of_array = [  ]
      
      Otherwise, if array arguments are passed to let but not wrapped within [ and ] characters, then the array arguments will be joined together as a string, with spaces between each element.
      b7a93117
  20. Jun 22, 2017
  21. Jun 20, 2017
    • Michael Aaron Murphy's avatar
      Implement Length Methods · 14d6b336
      Michael Aaron Murphy authored
      Implements the `$len()` and `$len_bytes()` methods for strings, and
      the `@len()` method for arrays. The len method for arrays returns
      the number of elements in the array. The len method for strings
      returns the number of graphemes in the string, whereas the
      len_bytes method returns the number of bytes the string occupies.
      14d6b336
  22. Jun 19, 2017
  23. Jun 18, 2017
  24. Jun 17, 2017
  25. Jun 14, 2017
  26. Jun 05, 2017
  27. Apr 20, 2017
  28. Apr 12, 2017
  29. Apr 09, 2017
Loading