Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-11-19 04:54:17 -06:00
commit f086abcea6
789 files changed
+149185

No files matched your search

+19
View File
@@ -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")));
}