commit cdd0ac0625fd932e49a286653eea31f797fa28bd
parent 5eaf405ca9f6878402d817c2dd3dc429eb25c88c
Author: citbl <citbl@citbl.org>
Date: Fri, 29 May 2026 22:01:21 +1000
add vec tokens
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/lexer.ads b/src/lexer.ads
@@ -1,3 +1,5 @@
+with Ada.Containers.Vectors; use Ada.Containers.Vectors;
+
package Lexer is
type Token_Type is
@@ -9,10 +11,13 @@ package Lexer is
Line, Col : Positive;
end record;
+ package Token_Vectors is new
+ Vectors (Index_Type => Natural, Element_Type => Token);
+
type Lexer is record
Source : String;
File_Name : String;
-
+ Tokens : Token_Vectors.Vector;
end record;
procedure Lex (L : in out Lexer);
end Lexer;