@@ -96,6 +96,7 @@ DECLARE_VALUE_FN(inherits);
9696DECLARE_VALUE_FN (implementation );
9797DECLARE_VALUE_FN (kind );
9898DECLARE_VALUE_FN (language );
99+ DECLARE_VALUE_FN (nth );
99100DECLARE_VALUE_FN (scope );
100101DECLARE_VALUE_FN (scope_kind );
101102DECLARE_VALUE_FN (scope_name );
@@ -213,6 +214,8 @@ static DSLProcBind pbinds [] = {
213214 .helpstr = "-> <list>" },
214215 { "$implementation" , value_implementation , NULL , DSL_PATTR_MEMORABLE , 0UL ,
215216 .helpstr = "-> #f|<string>" },
217+ { "$nth" , value_nth , NULL , DSL_PATTR_MEMORABLE , 0UL ,
218+ .helpstr = "-> #f|<integer>" },
216219 { "$kind" , value_kind , NULL , DSL_PATTR_MEMORABLE , 0UL ,
217220 .helpstr = "-> #f|<string>" },
218221 { "$language" , value_language , NULL , DSL_PATTR_MEMORABLE , 0UL ,
@@ -903,6 +906,7 @@ DEFINE_VALUE_FN(inherits)
903906DEFINE_VALUE_FN (implementation )
904907DEFINE_VALUE_FN (kind )
905908DEFINE_VALUE_FN (language )
909+ DEFINE_VALUE_FN (nth )
906910DEFINE_VALUE_FN (scope )
907911DEFINE_VALUE_FN (scope_kind )
908912DEFINE_VALUE_FN (scope_name )
@@ -937,6 +941,23 @@ EsObject* dsl_entry_xget_string (const tagEntry *entry, const char* name)
937941 return es_false ;
938942}
939943
944+ EsObject * dsl_entry_xget_integer (const tagEntry * entry , const char * name )
945+ {
946+ const char * end_str = entry_xget (entry , name );
947+ EsObject * o ;
948+
949+ if (end_str )
950+ {
951+ o = es_read_from_string (end_str , NULL );
952+ if (es_integer_p (o ))
953+ return es_object_autounref (o );
954+ else
955+ return es_false ;
956+ }
957+ else
958+ return es_false ;
959+ }
960+
940961/*
941962 * Accessesors for tagEntry
942963 */
@@ -978,6 +999,11 @@ EsObject* dsl_entry_language (const tagEntry *entry)
978999 return dsl_entry_xget_string (entry , "language" );
9791000}
9801001
1002+ EsObject * dsl_entry_nth (const tagEntry * entry )
1003+ {
1004+ return dsl_entry_xget_integer (entry , "nth" );
1005+ }
1006+
9811007EsObject * dsl_entry_implementation (const tagEntry * entry )
9821008{
9831009 return dsl_entry_xget_string (entry , "implementation" );
@@ -1005,19 +1031,7 @@ EsObject* dsl_entry_extras (const tagEntry *entry)
10051031
10061032EsObject * dsl_entry_end (const tagEntry * entry )
10071033{
1008- const char * end_str = entry_xget (entry , "end" );
1009- EsObject * o ;
1010-
1011- if (end_str )
1012- {
1013- o = es_read_from_string (end_str , NULL );
1014- if (es_integer_p (o ))
1015- return es_object_autounref (o );
1016- else
1017- return es_false ;
1018- }
1019- else
1020- return es_false ;
1034+ return dsl_entry_xget_integer (entry , "end" );
10211035}
10221036
10231037EsObject * dsl_entry_kind (const tagEntry * entry )
0 commit comments