Esempio n. 1
0
        public void Report_Invalid_Character(int position, char character)
        {
            var span    = new Text_Span(position, 1);
            var message = $"Invalid Character Input: '{character}'......";

            Report(span, message);
        }
Esempio n. 2
0
        internal void Report_Invalid_Character(int position, char character)
        {
            var span    = new Text_Span(position, 1);
            var message = $"ERROR: Invalid Character Input: '{character}'";

            Report(span, message);
        }
        internal void Report_Invalid_Number(Text_Span span, string text, Type type)
        {
            var message = $"The number {text} isn't valid {type}";

            Report(span, message);
        }
        private void Report(Text_Span span, string message)
        {
            var diagnostic = new Diagnostic(span, message);

            _diagnostics.Add(diagnostic);
        }
Esempio n. 5
0
 public void Report_Unexpected_Token(Text_Span span, Syntax_Kind_of_Token actual_kind, Syntax_Kind_of_Token expected_kind)
 {
     var message = $"Unexpected token <{actual_kind}>, expected <{expected_kind}>......";
 }
Esempio n. 6
0
        public void Report_Undefined_Name(Text_Span span, string name)
        {
            var message = $"Variable '{name}' is not there......";

            Report(span, message);
        }
Esempio n. 7
0
        public void Report_Undefined_Binary_Operator(Text_Span span, string operator_text, Type left_type, Type right_type)
        {
            var message = $"Binary operator '{operator_text}' is not defined for types {left_type} and {right_type}......";

            Report(span, message);
        }
Esempio n. 8
0
        public void Report_Undefined_Unary_Operator(Text_Span span, string operator_text, Type operand_type)
        {
            var message = $"Unary operator '{operator_text}' is not defined for type {operand_type}......";

            Report(span, message);
        }
Esempio n. 9
0
        public void Report_Undefined_Name(Text_Span span, string name)
        {
            var message = $"You didn't tell what variable '{name}' is ......";

            Report(span, message);
        }