forked from enlightenment/efl
eolian: Eolian_Object for docs
This commit is contained in:
parent
0703cc0f5e
commit
a4485484f1
|
@ -253,9 +253,13 @@ cend:
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
eina_strbuf_reset(ls->buff);
|
||||||
|
|
||||||
skip_ws(ls);
|
skip_ws(ls);
|
||||||
|
@ -651,11 +655,14 @@ lex(Eo_Lexer *ls, Eo_Token *tok)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case '[':
|
case '[':
|
||||||
next_char(ls);
|
{
|
||||||
if (ls->current != '[') return '[';
|
int dline = ls->line_number, dcol = ls->column;
|
||||||
next_char(ls);
|
next_char(ls);
|
||||||
read_doc(ls, tok);
|
if (ls->current != '[') return '[';
|
||||||
return TOK_DOC;
|
next_char(ls);
|
||||||
|
read_doc(ls, tok, dline, dcol);
|
||||||
|
return TOK_DOC;
|
||||||
|
}
|
||||||
case '\0':
|
case '\0':
|
||||||
return -1;
|
return -1;
|
||||||
case '=':
|
case '=':
|
||||||
|
|
|
@ -81,12 +81,6 @@ enum Numbers
|
||||||
NUM_DOUBLE
|
NUM_DOUBLE
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _Eo_Doc
|
|
||||||
{
|
|
||||||
Eina_Stringshare *summary;
|
|
||||||
Eina_Stringshare *description;
|
|
||||||
} Eo_Doc;
|
|
||||||
|
|
||||||
typedef union
|
typedef union
|
||||||
{
|
{
|
||||||
char c;
|
char c;
|
||||||
|
@ -99,7 +93,7 @@ typedef union
|
||||||
unsigned long long ull;
|
unsigned long long ull;
|
||||||
float f;
|
float f;
|
||||||
double d;
|
double d;
|
||||||
Eo_Doc *doc;
|
Eolian_Documentation *doc;
|
||||||
} Eo_Token_Union;
|
} Eo_Token_Union;
|
||||||
|
|
||||||
/* a token - "token" is the actual token id, "value" is the value of a token
|
/* a token - "token" is the actual token id, "value" is the value of a token
|
||||||
|
|
|
@ -60,6 +60,13 @@ typedef struct _Eolian_Object
|
||||||
int column;
|
int column;
|
||||||
} Eolian_Object;
|
} Eolian_Object;
|
||||||
|
|
||||||
|
typedef struct _Eolian_Documentation
|
||||||
|
{
|
||||||
|
Eolian_Object base;
|
||||||
|
Eina_Stringshare *summary;
|
||||||
|
Eina_Stringshare *description;
|
||||||
|
} Eolian_Documentation;
|
||||||
|
|
||||||
typedef struct _Eolian_Declaration
|
typedef struct _Eolian_Declaration
|
||||||
{
|
{
|
||||||
Eolian_Declaration_Type type;
|
Eolian_Declaration_Type type;
|
||||||
|
|
Loading…
Reference in New Issue