May. 18th, 2014

github: shadowy octopus with the head of a robot, emblazoned with the Dreamwidth swirl (Default)
[personal profile] github
Branch: refs/heads/develop
Home: https://github.com/dreamwidth/dw-free
Commit: cdae6330f7e010eeaaa26c68a2aa22006d366454
https://github.com/dreamwidth/dw-free/commit/cdae6330f7e010eeaaa26c68a2aa22006d366454
Author: Mark Smith <mark@dreamwidth.org>
Date: 2014-05-18 (Sun, 18 May 2014)

Changed paths:
M src/s2/S2/NodeTerm.pm
M src/s2/S2/TokenKeyword.pm
A src/s2/tests/poppush.s2
A src/s2/tests/poppush.s2.out

Log Message:
-----------
Add "pop" support to S2

This adds a new language keyword: pop. It returns the last item in an
array (like a stack), leaving the array one item shorter.

Usage like:

var int myitem = pop $myarray;

It can be used anywhere you can use an expression, as you might expect.


Commit: 9870a5d1b84856fbd275c68dbf312d3ac4971abf
https://github.com/dreamwidth/dw-free/commit/9870a5d1b84856fbd275c68dbf312d3ac4971abf
Author: Mark Smith <mark@dreamwidth.org>
Date: 2014-05-18 (Sun, 18 May 2014)

Changed paths:
A src/s2/S2/NodePushStmt.pm
M src/s2/S2/NodeStmt.pm
M src/s2/tests/poppush.s2
M src/s2/tests/poppush.s2.out

Log Message:
-----------
Add push function to S2

This adds the push operator to the S2 language, which allows you to push
simple values onto arrays of the same type.

Usage:

var int[] iarray
push $iarray, 5

Also works with expressions on the right side, so you can be complicated
there if you really want. This is a statement, so it doesn't return
anything and you can't use it in other statements.


Commit: 075fd452a35dfb5db726800f6caa81534d549b62
https://github.com/dreamwidth/dw-free/commit/075fd452a35dfb5db726800f6caa81534d549b62
Author: Mark Smith <mark@dreamwidth.org>
Date: 2014-05-19 (Mon, 19 May 2014)

Changed paths:
M src/s2/S2/NodePushStmt.pm
M src/s2/tests/poppush.s2
M src/s2/tests/poppush.s2.out

Log Message:
-----------
Update push support to allow pushing arrays

This makes the push command allow you to push an array onto an array,
which basically appends the items from the array onto the first array.


Commit: 30304368161cd11aa52bcddd5a14bbff1aa62bc5
https://github.com/dreamwidth/dw-free/commit/30304368161cd11aa52bcddd5a14bbff1aa62bc5
Author: Afuna <afuna@users.noreply.github.com>
Date: 2014-05-18 (Sun, 18 May 2014)

Changed paths:
A src/s2/S2/NodePushStmt.pm
M src/s2/S2/NodeStmt.pm
M src/s2/S2/NodeTerm.pm
M src/s2/S2/TokenKeyword.pm
A src/s2/tests/poppush.s2
A src/s2/tests/poppush.s2.out

Log Message:
-----------
Merge pull request #504 from zorkian/s2-poppush

S2 pop/push language extension

For #726


Compare: https://github.com/dreamwidth/dw-free/compare/9979bd649222...30304368161c
Page generated Jul. 16th, 2025 05:36 am
Powered by Dreamwidth Studios