better error messages are awesome!
[pspp] / src / language / lexer / lexer.h
index 11a0c60d32517ff827638fed671f405d72f436bc..a197662ac4f74d4aeac0f8791702c958a0909cf5 100644 (file)
 #include "language/lexer/segment.h"
 #include "libpspp/cast.h"
 #include "libpspp/compiler.h"
+#include "libpspp/message.h"
 #include "libpspp/prompt.h"
+#include "libpspp/str.h"
 
 struct lexer;
+struct lex_source;
 struct macro;
 
+void lex_source_ref (const struct lex_source *);
+void lex_source_unref (struct lex_source *);
+struct substring lex_source_get_line (const struct lex_source *, int line);
+
 /* Handling of errors. */
 enum lex_error_mode
   {
@@ -151,6 +158,8 @@ struct substring lex_next_tokss (const struct lexer *, int n);
 int lex_ofs (const struct lexer *);
 const struct token *lex_ofs_token (const struct lexer *, int ofs);
 struct msg_location *lex_ofs_location (const struct lexer *, int ofs0, int ofs1);
+struct msg_point lex_ofs_start_point (const struct lexer *, int ofs);
+struct msg_point lex_ofs_end_point (const struct lexer *, int ofs);
 
 /* Token representation. */
 char *lex_next_representation (const struct lexer *, int n0, int n1);