Extend rule structure and nip rule parser (#16)

This commit is contained in:
Arto Simonyan
2024-05-01 01:34:57 +03:00
committed by GitHub
parent e27064213f
commit 345e37bbf9
5 changed files with 10 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ import (
const nipLine = "[type] == boots && [quality] == rare # [frw] >= 10 && [fireresist] >= 10 && ([lightresist]+[coldresist] >= 10 && [dexterity] >= 1 && [fireresist]+[poisonresist] >= 10) // this is a comment"
func Test_parseLine(t *testing.T) {
rules, err := ParseLine(nipLine)
rules, err := ParseLine(nipLine, "dummy", 0)
require.NoError(t, err)
expected := Rule{