Rename 'scripts' as 'validators' across the codebase.
This commit is contained in:
@@ -17,12 +17,12 @@ pub type UntypedModule = Module<(), UntypedDefinition>;
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum ModuleKind {
|
||||
Lib,
|
||||
Script,
|
||||
Validator,
|
||||
}
|
||||
|
||||
impl ModuleKind {
|
||||
pub fn is_script(&self) -> bool {
|
||||
matches!(self, ModuleKind::Script)
|
||||
pub fn is_validator(&self) -> bool {
|
||||
matches!(self, ModuleKind::Validator)
|
||||
}
|
||||
|
||||
pub fn is_lib(&self) -> bool {
|
||||
|
||||
@@ -42,7 +42,7 @@ fn module() {
|
||||
a + 2
|
||||
|> add_one
|
||||
|> add_one
|
||||
|
||||
|
||||
let thing = [ 1, 2, a ]
|
||||
|
||||
let idk = thing
|
||||
@@ -53,7 +53,7 @@ fn module() {
|
||||
pub fn wow2(a: Int){
|
||||
let b = {
|
||||
let x = 4
|
||||
|
||||
|
||||
x + 5
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ fn module() {
|
||||
1, 2 -> 3
|
||||
1 | 4, 5 -> {
|
||||
let amazing = 5
|
||||
|
||||
|
||||
amazing
|
||||
}
|
||||
3 -> 9
|
||||
@@ -106,13 +106,13 @@ fn module() {
|
||||
}
|
||||
"#;
|
||||
|
||||
let (module, _extra) = parser::module(code, ast::ModuleKind::Script).unwrap();
|
||||
let (module, _extra) = parser::module(code, ast::ModuleKind::Validator).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
module,
|
||||
ast::UntypedModule {
|
||||
docs: vec![],
|
||||
kind: ast::ModuleKind::Script,
|
||||
kind: ast::ModuleKind::Validator,
|
||||
name: "".to_string(),
|
||||
type_info: (),
|
||||
definitions: vec![
|
||||
|
||||
Reference in New Issue
Block a user