Skip to content

Section

xtay2 edited this page Feb 16, 2023 · 5 revisions

Introduction

The Section is a terminal that matches any section enclosed in two symbols. This can get used for comments or strings.

Constructors

  • Section(char open, char close): Creates a section without an escape-symbol.
  • Section(char open, char close, char escape): Creates a section with an escape-symbol.

Examples

new Section('[', ']', '/');

Matches

"[]"
"[some content]"
"[other /]content]"

Fails

"[]]"
"]["
"/[]"

Clone this wiki locally