29 lines
640 B
Plaintext
29 lines
640 B
Plaintext
#!/usr/bin/env/jsish
|
|
/* Comments, in Jsish */
|
|
|
|
// to end of line comment, double slash
|
|
|
|
/*
|
|
Enclosed comment, slash star, ending with star slash
|
|
Cannot be nested, but can cross line boundaries and occur
|
|
pretty much anywhere whitespace is allowed
|
|
*/
|
|
|
|
var x = 'X'; /* A var called X */
|
|
/* active code on this line */ printf("Result %q %d\n", /* comment code mix */ x, /**/42);
|
|
|
|
;x;
|
|
// jsish also handles double slash commented
|
|
// unit test echo lines as a special case of "expect failure"
|
|
|
|
;//noname(x);
|
|
|
|
/*
|
|
=!EXPECTSTART!=
|
|
Result X 42
|
|
x ==> X
|
|
noname(x) ==>
|
|
PASS!: err = can not execute expression: 'noname' not a function
|
|
=!EXPECTEND!=
|
|
*/
|