Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BaseMax committed Jan 25, 2025
1 parent fe03318 commit 1f97b74
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 4 deletions.
1 change: 1 addition & 0 deletions config/yaml/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

| نام ویژگی | توضیح | تولید |
|-----------|------------|-------|
| `منبع` | | `href` |

<h2 id="include">دستور <code>بارگیری</code></h2>

Expand Down
14 changes: 14 additions & 0 deletions config/yaml/json/layout/attribute/type.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@
]
}
},
{
"generate_name": "href",
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_HREF",
"reserved_values": "",
"type": "AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY",
"text": {
"en": [
"src"
],
"fa": [
"منبع"
]
}
},
{
"generate_name": "src",
"id": "AST_LAYOUT_ATTRIBUTE_TYPE_SRC",
Expand Down
10 changes: 10 additions & 0 deletions config/yaml/layout/attribute/type.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ items:
- src
fa:
- منبع

- generate_name: href
id: AST_LAYOUT_ATTRIBUTE_TYPE_HREF
reserved_values: ''
type: AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY
text:
en:
- src
fa:
- منبع
- generate_name: src
id: AST_LAYOUT_ATTRIBUTE_TYPE_SRC
reserved_values: ''
Expand Down
2 changes: 1 addition & 1 deletion src/ast_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#include "ast_layout.h"

#include "generated-config/ast_layout_attribute_value_extern.h"
#include "generated-config/ast_layout_type_attributes_all.h"
#include "generated-config/ast_layout_type_attributes_values.h"
#include "generated-config/ast_layout_type_attributes_all.h"

/**
*
Expand Down
2 changes: 2 additions & 0 deletions src/generated-config/ast_layout_attribute_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ADD_LAYOUT_ATTRIBUTE_TYPE(AST_LAYOUT_ATTRIBUTE_TYPE_CONTENT, "CONTENT", "content

ADD_LAYOUT_ATTRIBUTE_TYPE(AST_LAYOUT_ATTRIBUTE_TYPE_FONT_SRC, "FONT_SRC", "font_src", "منبع", "src", AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY, NULL, NULL, AST_LAYOUT_ATTRIBUTE_VALUE_HANDLER_FONT_URL)

ADD_LAYOUT_ATTRIBUTE_TYPE(AST_LAYOUT_ATTRIBUTE_TYPE_HREF, "HREF", "href", "منبع", "href", AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY, NULL, NULL, AST_LAYOUT_ATTRIBUTE_VALUE_HANDLER_SIMPLE)

ADD_LAYOUT_ATTRIBUTE_TYPE(AST_LAYOUT_ATTRIBUTE_TYPE_SRC, "SRC", "src", "منبع", "src", AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY, NULL, NULL, AST_LAYOUT_ATTRIBUTE_VALUE_HANDLER_SIMPLE)

ADD_LAYOUT_ATTRIBUTE_TYPE(AST_LAYOUT_ATTRIBUTE_TYPE_LABEL, "LABEL", "label", "برچسب", "label", AST_LAYOUT_ATTRIBUTE_FILTER_STRING_ANY, NULL, NULL, AST_LAYOUT_ATTRIBUTE_VALUE_HANDLER_SIMPLE)
Expand Down
4 changes: 3 additions & 1 deletion src/generated-config/ast_layout_type_attributes_all.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ layout_map_entry_t layout_map[] = {
{ AST_LAYOUT_TYPE_MEDIA, valid_attributes_media, valid_attributes_media_length },

// ----------- END AUTO GENERATED ----------- //
const size_t map_size = sizeof(layout_map) / sizeof(layout_map[0]);
};

const size_t map_size = sizeof(layout_map) / sizeof(layout_map[0]);

#endif
4 changes: 2 additions & 2 deletions src/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ADD_KEYWORD(TOKEN_FOR, "FOR", "for", 3)
ADD_KEYWORD(TOKEN_BREAK, "BREAK", "break", 5)
ADD_KEYWORD(TOKEN_CONTINUE, "CONTINUE", "continue", 8)
ADD_KEYWORD(TOKEN_BOOLEAN, "BOOLEAN", "true", 4)
ADD_KEYWORD_HIDE(TOKEN_BOOLEATOKEN_SHIFT_LEFT_ASSIGNN, "BOOLEAN", "false", 5)
// ADD_KEYWORD_HIDE(TOKEN_SHIFT_LEFT_ASSIGNN, "BOOLEAN", "false", 5)

ADD_TOKEN(TOKEN_IDENTIFIER, "IDENTIFIER", "IDENTIFIER")
ADD_TOKEN(TOKEN_STRING, "STRING", "STRING")
Expand All @@ -74,7 +74,7 @@ ADD_TOKEN(TOKEN_INCREMENT, "INCREMENT", "++")
ADD_TOKEN(TOKEN_DECREMENT, "DECREMENT", "--")
ADD_TOKEN(TOKEN_SHIFT_LEFT, "SHIFT_LEFT", "<<")
ADD_TOKEN(TOKEN_SHIFT_RIGHT, "SHIFT_RIGHT", ">>")
ADD_TOKEN(, "SHIFT_LEFT_ASSIGN", "<<=")
ADD_TOKEN(TOKEN_SHIFT_LEFT_ASSIGN, "SHIFT_LEFT_ASSIGN", "<<=")
ADD_TOKEN(TOKEN_SHIFT_RIGHT_ASSIGN, "SHIFT_RIGHT_ASSIGN", ">>=")

ADD_CHAR_TOKEN(TOKEN_LEFT_BRACE, "LEFT_BRACE", "{", '{')
Expand Down

0 comments on commit 1f97b74

Please sign in to comment.