Initial Commit
This commit is contained in:
789 files changed
+149185
No files matched your search
@@ -0,0 +1,19 @@
|
||||
#! @file names.sakura
|
||||
#! @author John Christman (sorakatadzuma@gmail.com)
|
||||
#! @copyright Malunal Studios, LLC.
|
||||
#! @license MIT
|
||||
#!
|
||||
#! Contains the test that the reserved words follow the keywords, where the
|
||||
#! names table interns them.
|
||||
|
||||
import std::testing;
|
||||
module sakura::analyzer;
|
||||
|
||||
|
||||
|
||||
@test def reserved_words_follow_the_keywords(t: &mut tester): void {
|
||||
var table := names::new();
|
||||
t.expects(table.is_keyword(table.intern("while")) && !table.is_keyword(table.intern("this")));
|
||||
t.expects(table.is_reserved(table.intern("this")) && table.is_reserved(table.intern("_")));
|
||||
t.expects(!table.is_reserved(table.intern("get")) && !table.is_reserved(table.intern("thing")));
|
||||
}
|
||||
Reference in new issue
Block a user