diff --git a/std/jule/build/log.jule b/std/jule/build/log.jule index 5fe368d1e..2ce060c5e 100644 --- a/std/jule/build/log.jule +++ b/std/jule/build/log.jule @@ -191,7 +191,7 @@ pub enum LogMsg: str { IncompatibleTypeForPtrArithmetic = `type @ is incompatible to use for pointer arithmetic`, ComptimePanic = `compile-time panic: @`, InvalidTypeForIndexing = `type @ is invalid for indexing`, - UnusedDirective = `this directive is out of scope, cant assign to any define`, + UnusedDirective = `this directive is out of scope, put it where it will be useful or delete it`, UnsupportedDirective = `directive @ is not supported by define`, PanicedWithNonStr = `panic function only accepts strings`, ErrorWithNonExceptional = `error call can only useable for exceptional functions`, diff --git a/std/jule/parser/parser.jule b/std/jule/parser/parser.jule index 305c970de..c2bb271b0 100644 --- a/std/jule/parser/parser.jule +++ b/std/jule/parser/parser.jule @@ -1962,5 +1962,9 @@ impl Parser { break } } + + if self.directives.len != 0 { + self.push_err(self.directives[0].tag, LogMsg.UnusedDirective) + } } } \ No newline at end of file