Add validator for byte

This commit is contained in:
Adolfo Ochagavía
2018-11-11 20:27:00 +01:00
parent a4f7d7a7cd
commit c258b4fdb0
8 changed files with 420 additions and 94 deletions

View File

@@ -5,6 +5,7 @@ use crate::{
yellow::SyntaxError,
};
mod byte;
mod char;
mod string;
@@ -12,6 +13,7 @@ pub(crate) fn validate(file: &SourceFileNode) -> Vec<SyntaxError> {
let mut errors = Vec::new();
for node in file.syntax().descendants() {
let _ = visitor_ctx(&mut errors)
.visit::<ast::Byte, _>(self::byte::validate_byte_node)
.visit::<ast::Char, _>(self::char::validate_char_node)
.visit::<ast::String, _>(self::string::validate_string_node)
.accept(node);