aboutsummaryrefslogtreecommitdiff
path: root/tests/programs/backtick.zc
blob: 548eac89d3cad1966ab8e8d7a6dfeacd045d7e53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
namespace;
include rt;

// a backtick ends the source only where the lexer would read it as a token.
// this one, in a line comment: ` does not end anything.
/* nor does this, in a block comment ` with a star / and a slash */
fn main() {
	let s = "a`b", t = "q\"`", c = '`', d = '\'';
	rt.put_n(rt.len_w(s)); rt.put_c(' '); rt.put_n(rt.len_w(t)); rt.put_c(' '); rt.put_n(c); rt.put_c(' '); rt.put_n(d); rt.put_c(' ');
	while (!rt.eof()) rt.put_c(rt.get_c());
	return 0;
}