nightshade

The nightshade programming language, compiler and tools (WIP)
Log | Files | Refs | README

lexer.ads (551B)



with Ada.Containers.Vectors;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with Types;                 use Types;

package Lexer is

   type Lexer is record
      Source    : Source_Ref;
      File_Name : File_Name_Ref;
      Tokens    : Token_Vector.Vector;
      Pos       : Positive;
      Line      : Positive;
      Col       : Positive;
   end record;

   function Init (File_Name : File_Name_Ref; File_Contents : Source_Ref) return Lexer;

   procedure Print_Tokens (L : in out Lexer);

   procedure Lex (L : in out Lexer);
end Lexer;