File: 37-annotations.ha

package info (click to toggle)
harec 0.25.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,420 kB
  • sloc: ansic: 19,905; asm: 247; makefile: 116; lisp: 80; sh: 45
file content (21 lines) | stat: -rw-r--r-- 838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use rt::{compile, status};

#[this::should::lex()]

#[test::annotation]
#[test::annotation(param, type, "string", 2 + 2)]
#[test::nested(foo(bar[() baz[{}[]]{bat}]))]
export #[annotations] fn #[can] main(#[appear]) #[anywhere] void = {
	compile(status::LEX, "#[(this::should::error)]")!;
	compile(status::LEX, "#[but this should not]")!;
	compile(status::LEX, "#[nor:: ::should::this]")!;
	compile(status::LEX, "# [no::space::allowed]")!;
	compile(status::LEX, "#[mismatched(bracket]]")!;
	compile(status::LEX, "#[mismatched(bracket}]")!;
	compile(status::LEX, "#[mismatched[bracket)]")!;
	compile(status::LEX, "#[mismatched[bracket}]")!;
	compile(status::LEX, "#[mismatched{bracket)]")!;
	compile(status::LEX, "#[mismatched{bracket]]")!;
	compile(status::LEX, "#[mismatched::bracket)")!;
	compile(status::LEX, "#[missing::bracket")!;
};