1. 19 Nov, 2016 1 commit
    • Leon Arnott's avatar
      Added the "each" lambda keyword, to enable no-clause lambdas to be expressed. · cb3f67c2913a
      Leon Arnott authored
      The "each" keyword is a lambda "clause" that simply sets the lambda's subject, but, importantly, it allows one to create a lambda with no actual clauses. Formerly, such a lambda would be syntactically identical to (and unable to be disambiguated from) a plain temp variable. This allows future macros (such as a possible (loop:) macro) to use lambdas that iterate over the entire sequence, without specifying any specific selection or modification.
  2. 04 Nov, 2016 1 commit
  3. 02 Nov, 2016 2 commits
  4. 01 Nov, 2016 1 commit
  5. 11 Sep, 2016 1 commit
    • Leon Arnott's avatar
      Added the (hover-style:) changer macro, which allows passed style changers to... · 9a605ba4689d
      Leon Arnott authored
      Added the (hover-style:) changer macro, which allows passed style changers to only apply when hovering over the hook.
      I'm a little uncomfortable about its name (as compared to (text-style:)) and the specificity of only allowing style changers (which currently does not include (transition:)s) but I think it'll be fine, and could be safely expanded a little in future.
      Also fixed a bug where joining a changer, using "+" in markup, with a changer macro that produced an error, would suppress the error.
  6. 06 Sep, 2016 1 commit
    • Leon Arnott's avatar
      (count:) now accepts multiple values. · d67319fd80bb
      Leon Arnott authored
      Also fixed a bug where the wrong value would be given if passed the empty string as a search term (due to being passed to String#split()).
      Closes #8.
  7. 03 Sep, 2016 2 commits
    • Leon Arnott's avatar
    • Leon Arnott's avatar
      Added "any" and "all" properties to sequentials, which are used for "all" and... · c6a0b59b3b47
      Leon Arnott authored
      Added "any" and "all" properties to sequentials, which are used for "all" and "any" comparison operations.
      These properties produce special, unstorable "determiner" values, which, when used as the object of "contains", "is in", or other comparison expressions, results in every element of the sequential being compared using the operation. This is, I feel, a better solution to simply adding "contains all" and "contains any" operators, in that it naturally expands to cover ">", ">=" and other non-set-related operations.
      Also fixes a bug (that didn't manifest until just now) where certain unstorable values could be stored if they were in storable data structures.
  8. 01 Sep, 2016 1 commit
    • Leon Arnott's avatar
      Joining changers outside of macros now requres interstitial "+" signs. · af415bd075be
      Leon Arnott authored
      This was important, I decided, to ensure consistency in changer concatenation between macros and passage markup. $changer + $changer2 now joins changers in both modes.
      Also added a "none" (text-style:) which, when added to other (text-style:) combined changers, removes their styles.
  9. 30 Aug, 2016 3 commits
  10. 29 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Added hidden hook markup and the macros (hidden:), and (show:). · b132150f7b5c
      Leon Arnott authored
      I spent years feeling rueful about adding this, as I'd felt it directly competes with the (replace:) macros' idiom. Lately, though, I've seen the merit in it, as a way of keeping revealed text inside the flow of the prose it is revealed inside, when said text is vital to the readability of the passage.
      I currently feel like this doesn't provide much way of expressing structure and relationship between hidden hooks and visible ones - no semantic way to convey that they form a list with only a single one visible, for instance, or that one builds upon the last, as with <<becomes>> and <<gains>> in Twine 1. But, future macros providing semantically clearer means of showing hidden hooks ((show-next:), (reveal-next:) or somesuch) can always be added.
  11. 24 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Fixed various mistakes or vaguaries in numerous error messages. · b1f96134476b
      Leon Arnott authored
      Also added to the test case HTML page a "ErrorMessages" global which collects all Harlowe error messages produced as a result of tests, so that they can be checked.
      Also decided to stick with the uncapitalised "boolean" for the data type in documentation and errors.
  12. 23 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Lambdas may now omit the leading temp variable, and can use "it" for it. · 6906e892b585
      Leon Arnott authored
      I'm still not entirely sold on this decision, which is why it's currently undocumented, but here it is: you can now write (find: where it > 3) etc., and "it" will refer to the loop variable, even if elided. "it" also works when the variable is provided - (find: _item where it > 3).
      (What I'm hesitant about is that this is ultimately a new meaning for "it", similar to but not equivalent to previous uses where "it"'s value was always leftward and explicitly visible.)
      Also fixed/removed a few revision tests, and altered some documentation references to (datamap:), changing it to (dm:).
  13. 20 Aug, 2016 3 commits
    • Leon Arnott's avatar
      Fixed a parsing bug involving belonging indices and negative numbers. · 0febb90c4d69
      Leon Arnott authored
      This prevented a meaningful error message being displayed for "(print: 1st of -0.2)", for instance.
      Incidentally, this also indirectly changes the syntax highlighting for negative numbers - now, the - sign, if alongside the first digit, now is coloured the same as the rest of the number.
    • Leon Arnott's avatar
      Differing revision changers (like (append:) and (prepend:)) can now be added together. · 871a14138eca
      Leon Arnott authored
      This involved adding some structural indirection to the ChangeDescriptor's newTargets property - instead of an array of HookSets or jQuerys, it's an array of {target, append} properties, tying the append method to the target.
    • Leon Arnott's avatar
      HookSets no longer have a "section" property. · cf8600032bc9
      Leon Arnott authored
      This enables the "when stored, can work across passages" test for revision macros to finally pass. In practice, it means that the section used for HookSets' hook selection is determined by the consumer macro. As a result, Section.selectHook() is gone, and (somewhat frustratingly) HookSet.forEach() now takes a section as its first param, breaking symmetry with Array#forEach.
      While implementing this, HookSets' targets and newTargets were changed to no longer be stored as strings - only HookSet, jQuery collections and arrays thereof are used now.
      Also, as a necessity of these changes, HookSets no longer have a length, and can no longer be spread with "...". (But, neither of these had much point ever since they became unstorable).
  14. 18 Aug, 2016 1 commit
  15. 17 Aug, 2016 1 commit
  16. 16 Aug, 2016 1 commit
  17. 10 Aug, 2016 1 commit
  18. 08 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Added the (dataentries:) macro. · f4871e79bab3
      Leon Arnott authored
      This macro, designed primarily for use with lambdas, lets you iterate over a datamap and have access to its names and values easily, without needing to interleave (datanames:) and (datavalues:).
       * Fixed a bug where lambdas couldn't iterate over values that consisted of datamaps, datasets, or any Harlowe-specific data.
       * Added some styling for "where", "via", "making" and "with" to the CodeMirror mode.
  19. 07 Aug, 2016 2 commits
  20. 04 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Initial commit of the debug mode variable pane. · 0e8dffeafbe4
      Leon Arnott authored
      This pane displays the (currently just global) variables in the story, and should update them the moment they change, using VarRef event handlers. This still could do with a few more features, such as: a button to hide/show the pane, and of course the inclusion of temporary variables.
       * Fixed some serious bugs in the debug mode's turns dropdown.
       * Added an on() event handler register to VarRef.
       * Error messages now refer to Booleans as "the Boolean value" rather than "the logic value".
       * Corrected a few documentation lines.
  21. 02 Aug, 2016 2 commits
  22. 01 Aug, 2016 1 commit
  23. 25 Jul, 2016 2 commits
    • Leon Arnott's avatar
      Fixed a compatibility bug with jQuery 3.0. · af7563d3b006
      Leon Arnott authored
      jQuery 3 removes the 'context' property, which was used by the fix added in b0a5841edfa4. A survey leads me to believe, though, that using just desc.target instead of desc.target.context should work too. The situation I believe I was guarding against (the desc.target being detached from the DOM such that its containing <tw-collapsed> element is invisible) doesn't seem like it can actually occur.
    • Leon Arnott's avatar
      Improved the performace of the "turns" debug dropdown. · e29dc9d76576
      Leon Arnott authored
      Now, State has three event hooks which DebugMode uses to alter its view - forward, back and load - and the handlers DebugMode registers only do the minimum of DOM manipulation needed.
      Also fixed a bug in the "stores lots of data" test for (loadgame:).
  24. 21 Jul, 2016 1 commit
    • Leon Arnott's avatar
      Created a DebugMode module, and added a "turns" dropdown to the panel. · 1a804a8204db
      Leon Arnott authored
      This element allows the current session's turn history to be viewed, and to navigate to a particular turn using the menu.
       * Made the debug mode panel slightly smaller.
       * Brought forward the mathFilter change to (pow:) in e47bdd66af23.
       * Fixed the use of 'tilde' rather than 'grave' in the verbatim syntax documentation.
       * In the test suite HTML file, fixed the bug where the harlowe-css.css file was included twice.
  25. 14 Jul, 2016 1 commit
  26. 13 Jul, 2016 1 commit
    • Leon Arnott's avatar
      Altered the CodeMirror highlighting mode. · 4029a40e3fd4
      Leon Arnott authored
       * To provide aid in distinguishing new lines from wrapped lines, the lineNumbers CM option is now enabled (but with the numbers themselves replaced with bullets).
       * Placing the cursor on hook nametags will now highlight identical nametags and hookRefs, much like vice-versa.
       * Temporary variable occurrences can now be highlighted by placing the cursor on one.
       * The token underlining feature will now ignore unwrapped text tokens, the underlining of which somewhat distracted from editing prose.
       * String literal delineating quotes are now curved outward, as simulated "smart quotes", to help convey where such literals begin and end.
  27. 12 Jul, 2016 1 commit
  28. 11 Jul, 2016 1 commit
    • Leon Arnott's avatar
      Moved assignmentrequest.js to the datatypes directory. · a8080700a3d6
      Leon Arnott authored
      Since this is actually a directly user-created value, it should go here.
      Also renamed the "TwineScript_Unobservable" property to "TwineScript_Unstorable", and removed the unused properties "TwineScript_Sealed", "TwineScript_Writeproof" and "TwineScript_DeleteValue".
  29. 09 Jul, 2016 1 commit
  30. 07 Jul, 2016 2 commits