with dot identifier может быть со многими точками
parent
56ae78b00f
commit
3c31489253
|
@ -125,7 +125,7 @@ LETTER_OR_DIGIT [a-zA-Z0-9_]
|
|||
return STRING_LITERAL;
|
||||
}
|
||||
|
||||
{LETTER}{LETTER_OR_DIGIT}*(\.{LETTER}{LETTER_OR_DIGIT}*)? {
|
||||
{LETTER}({LETTER_OR_DIGIT}*\.)*{LETTER_OR_DIGIT}* {
|
||||
yylval.str = strdup(yytext);
|
||||
if (strchr(yytext, '.') != NULL) {
|
||||
return WITH_DOT_IDENTIFIER;
|
||||
|
|
|
@ -141,7 +141,7 @@ cicle:
|
|||
{ printf("\033[1;34mLOOP: full for loop with init, condition and post\033[0m\n"); }
|
||||
| FOR log_expr loop_block
|
||||
{ printf("\033[1;34mLOOP: for loop with condition only\033[0m\n"); }
|
||||
| FOR identifiers_list SHORT_DECLARATION RANGE IDENTIFIER loop_block
|
||||
| FOR identifiers_list SHORT_DECLARATION RANGE any_identifier loop_block
|
||||
{ printf("\033[1;34mLOOP: range for loop\033[0m\n"); }
|
||||
;
|
||||
|
||||
|
|
|
@ -10,6 +10,25 @@ func server(a int) {
|
|||
|
||||
func iife(work int) {
|
||||
|
||||
var err error;
|
||||
var app models.App;
|
||||
|
||||
log.SetPrefix(fmt.Sprintf("%s | ", app.Cfg.ServerDomain));
|
||||
|
||||
router := setupRoutes(app);
|
||||
|
||||
if app, err = models.InitApp(); err != nil {
|
||||
log.Fatal(err);
|
||||
}
|
||||
|
||||
|
||||
// Обработка страничек постов
|
||||
for key := range app.Posts {
|
||||
postLink := a(key);
|
||||
router.Handle(postLink, m(controllers_pages.PostPageHandler(app)));
|
||||
}
|
||||
|
||||
|
||||
for i := 1; i < 3; i++ {
|
||||
func(){}();
|
||||
func(){fmt.Println(123);}();
|
||||
|
|
Loading…
Reference in New Issue