8000 version bump · coderofsalvation/powscript@ef4ec76 · GitHub
[go: up one dir, main page]

Skip to content

Commit ef4ec76

Browse files
version bump
1 parent 7845cef commit ef4ec76

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "powscript",
3-
"version": "1.0.18",
3+
"version": "1.0.19",
44
"description": "painless shellscript aka bash for hipsters: a bash transpiler which reduces noise",
55
"main": "powscript",
66
"directories": {

powscript

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,19 @@ empty "$1" && {
323323
transpile_sugar(){
324324
while IFS="" read -r line; do
325325
stack_update "$line"
326-
[[ "$line" =~ ^(require ) ]] && continue
327-
[[ "$line" =~ (\$[a-zA-Z_0-9]*\[) ]] && transpile_array_get "$line" && continue
328-
[[ "$line" =~ ^([ ]*for line from ) ]] && transpile_foreachline_from 8000 "$line" && continue
329-
[[ "$line" =~ ^([ ]*for ) ]] && transpile_for "$line" && continue
330-
[[ "$line" =~ ^([ ]*when done) ]] && transpile_when_done "$line" && continue
331-
[[ "$line" =~ (await .* then foreachline) ]] && transpile_then "$line" "pl" "pipe_each_line" && continue
332-
[[ "$line" =~ (await .* then \|) ]] && transpile_then "$line" "p" "pipe" && continue
333-
[[ "$line" =~ (await .* then) ]] && transpile_then "$line" && continue
334-
[[ "$line" =~ ^([ ]*if ) ]] && transpile_if "$line" && continue
335-
[[ "$line" =~ ^([ ]*switch ) ]] && transpile_switch "$line" && continue
336-
[[ "$line" =~ ^([ ]*case ) ]] && transpile_case "$line" && continue
337-
[[ "$line" =~ ([a-zA-Z_0-9]\+=) ]] && transpile_array_push "$line" && continue
338-
[[ "$line" =~ ^([a-zA-Z_0-9]*\([a-zA-Z_0-9, ]*\)) ]] && transpile_function "$line" && continue
326+
[[ "$line" =~ ^(require ) ]] && continue
327+
[[ "$line" =~ (\$[a-zA-Z_0-9]*\[) ]] && transpile_array_get "$line" && continue
328+
[[ "$line" =~ ^([ ]*for line from ) ]] && transpile_foreachline_from "$line" && continue
329+
[[ "$line" =~ ^([ ]*for ) ]] && transpile_for "$line" && continue
330+
[[ "$line" =~ ^([ ]*when done) ]] && transpile_when_done "$line" && continue
331+
[[ "$line" =~ (await .* then for line) ]] && transpile_then "$line" "pl" "pipe_each_line" && continue
332+
[[ "$line" =~ (await .* then \|) ]] && transpile_then "$line" "p" "pipe" && continue
333+
[[ "$line" =~ (await .* then) ]] && transpile_then "$line" && continue
334+
[[ "$line" =~ ^([ ]*if ) ]] && transpile_if "$line" && continue
335+
[[ "$line" =~ ^([ ]*switch ) ]] && transpile_switch "$line" && continue
336+
[[ "$line" =~ ^([ ]*case ) ]] && transpile_case "$line" && continue
337+
[[ "$line" =~ ([a-zA-Z_0-9]\+=) ]] && transpile_array_push "$line" && continue
338+
[[ "$line" =~ ^([a-zA-Z_0-9]*\([a-zA-Z_0-9, ]*\)) ]] && transpile_function "$line" && continue
339339
echo "$line" | transpile_all
340340
done < $1
341341
stack_update ""

src/powscript.bash

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ empty "$1" && {
3131
transpile_sugar(){
3232
while IFS="" read -r line; do
3333
stack_update "$line"
34-
[[ "$line" =~ ^(require ) ]] && continue
35-
[[ "$line" =~ (\$[a-zA-Z_0-9]*\[) ]] && transpile_array_get "$line" && continue 8000
36-
[[ "$line" =~ ^([ ]*for line from ) ]] && transpile_foreachline_from "$line" && continue
37-
[[ "$line" =~ ^([ ]*for ) ]] && transpile_for "$line" && continue
38-
[[ "$line" =~ ^([ ]*when done) ]] && transpile_when_done "$line" && continue
39-
[[ "$line" =~ (await .* then foreachline) ]] && transpile_then "$line" "pl" "pipe_each_line" && continue
40-
[[ "$line" =~ (await .* then \|) ]] && transpile_then "$line" "p" "pipe" && continue
41-
[[ "$line" =~ (await .* then) ]] && transpile_then "$line" && continue
42-
[[ "$line" =~ ^([ ]*if ) ]] && transpile_if "$line" && continue
43-
[[ "$line" =~ ^([ ]*switch ) ]] && transpile_switch "$line" && continue
44-
[[ "$line" =~ ^([ ]*case ) ]] && transpile_case "$line" && continue
45-
[[ "$line" =~ ([a-zA-Z_0-9]\+=) ]] && transpile_array_push "$line" && continue
46-
[[ "$line" =~ ^([a-zA-Z_0-9]*\([a-zA-Z_0-9, ]*\)) ]] && transpile_function "$line" && continue
34+
[[ "$line" =~ ^(require ) ]] && continue
35+
[[ "$line" =~ (\$[a-zA-Z_0-9]*\[) ]] && transpile_array_get "$line" && continue
36+
[[ "$line" =~ ^([ ]*for line from ) ]] && transpile_foreachline_from "$line" && continue
37+
[[ "$line" =~ ^([ ]*for ) ]] && transpile_for "$line" && continue
38+
[[ "$line" =~ ^([ ]*when done) ]] && transpile_when_done "$line" && continue
39+
[[ "$line" =~ (await .* then for line) ]] && transpile_then "$line" "pl" "pipe_each_line" && continue
40+
[[ "$line" =~ (await .* then \|) ]] && transpile_then "$line" "p" "pipe" && continue
41+
[[ "$line" =~ (await .* then) ]] && transpile_then "$line" && continue
42+
[[ "$line" =~ ^([ ]*if ) ]] && transpile_if "$line" && continue
43+
[[ "$line" =~ ^([ ]*switch ) ]] && transpile_switch "$line" && continue
44+
[[ "$line" =~ ^([ ]*case ) ]] && transpile_case "$line" && continue
45+
[[ "$line" =~ ([a-zA-Z_0-9]\+=) ]] && transpile_array_push "$line" && continue
46+
[[ "$line" =~ ^([a-zA-Z_0-9]*\([a-zA-Z_0-9, ]*\)) ]] && transpile_function "$line" && continue
4747
echo "$line" | transpile_all
4848
done < $1
4949
stack_update ""

test/async.pow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ when done
1717

1818
sleep 4s
1919

20-
await myfunc 123 then foreachline
20+
await myfunc 123 then for line
2121
if $line match (two|one)
2222
echo "line: $*"
2323
when done

0 commit comments

Comments
 (0)
0