alecthomas / alecthomas/participle

Document how to parse indentation based grammars

Aperta
#20 16 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
3.9k
Fork
213
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi I want to check if the prevoius char is a `:`. The exact example code I have is this:

```
Prefix: !
```

I want basicly to be able to check based on if the previous char is a `:` the `!` should get a string and later reuse the look back logic to check if I am inside an array which is defined like in yaml meaning to make sure the last 2 lines of the following example don't get into the array:

```
Commands:
- Trigger: afk
Response: "{{user}} just went afk"
- Trigger: [join_event]
Response: "Welcome to the Room {{last_joined_user}}"
Homeserver: matrix.org
HomeRoom: {{name}}
```

(Commands defines a Array with 2 objects in it which both have two key value pairs in them. HomeServer and HomeRoom are outside of that array)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.