}
static void
-read_doc(Eo_Lexer *ls, Eo_Token *tok)
+read_doc(Eo_Lexer *ls, Eo_Token *tok, int line, int column)
{
- Eo_Doc *doc = calloc(1, sizeof(Eo_Doc));
+ Eolian_Documentation *doc = calloc(1, sizeof(Eolian_Documentation));
+ doc->base.file = ls->filename;
+ doc->base.line = line;
+ doc->base.column = column;
+
eina_strbuf_reset(ls->buff);
skip_ws(ls);
continue;
}
case '[':
- next_char(ls);
- if (ls->current != '[') return '[';
- next_char(ls);
- read_doc(ls, tok);
- return TOK_DOC;
+ {
+ int dline = ls->line_number, dcol = ls->column;
+ next_char(ls);
+ if (ls->current != '[') return '[';
+ next_char(ls);
+ read_doc(ls, tok, dline, dcol);
+ return TOK_DOC;
+ }
case '\0':
return -1;
case '=':
NUM_DOUBLE
};
-typedef struct _Eo_Doc
-{
- Eina_Stringshare *summary;
- Eina_Stringshare *description;
-} Eo_Doc;
-
typedef union
{
char c;
unsigned long long ull;
float f;
double d;
- Eo_Doc *doc;
+ Eolian_Documentation *doc;
} Eo_Token_Union;
/* a token - "token" is the actual token id, "value" is the value of a token
int column;
} Eolian_Object;
+typedef struct _Eolian_Documentation
+{
+ Eolian_Object base;
+ Eina_Stringshare *summary;
+ Eina_Stringshare *description;
+} Eolian_Documentation;
+
typedef struct _Eolian_Declaration
{
Eolian_Declaration_Type type;