Skip to content

Commit e1b0519

Browse files
authored
Merge pull request #31 from demaere-oiie/args
Args
2 parents efd2b3f + f311d14 commit e1b0519

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

examples/bytebeat.psh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ fun main() {
172172
let SAMPLE_RATE = 8000;
173173
let dev = $audio_open_output(SAMPLE_RATE, 1);
174174

175-
let s = ($cmd_num_args() > 1 ? $cmd_get_arg(1) : "t*(t>>9|t>>13)&16");
176-
let d = ($cmd_num_args() > 2 ? $cmd_get_arg(2) : "x").parse_int(10);
175+
let s = $cmd_get_arg_or(1, "t*(t>>9|t>>13)&16");
176+
let d = $cmd_get_arg_or(2, "x").parse_int(10);
177177

178178
let bb = texpr(ParseCtx(s));
179179
let end_time = $time_current_ms() + (d==nil ? 5 : d)*1000;

examples/hershey_font.psh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ let window = $window_create(WIDTH, HEIGHT, "Hershey Text", 0);
315315
let font = Font(simplex, 72, 3.0, CYAN, 0);
316316
let mono = Font(simplex, 32, 2.0, CYAN, 22);
317317

318-
let s = ($cmd_num_args() > 1 ? $cmd_get_arg(1) : "Hello, Beautiful World!");
318+
let s = $cmd_get_arg_or(1, "Hello, Beautiful World!");
319319
let s_w = font.draw_string(0, 0, 0, s);
320320

321321
// Drawable ASCII chars

plush.tmbundle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "plush",
33
"displayName": "Plush",
44
"description": "Syntax highlighting for Plush using TextMate grammar",
5-
"version": "1.0.6",
5+
"version": "1.0.7",
66
"repository": {
77
"type": "git",
88
"url": "git+https://github.com/maximecb/plush.git",

0 commit comments

Comments
 (0)