diff --git a/src/lib/src/parsing/parse-ap.ts b/src/lib/src/parsing/parse-ap.ts new file mode 100644 index 0000000..f2a29df --- /dev/null +++ b/src/lib/src/parsing/parse-ap.ts @@ -0,0 +1 @@ +// TODO: ability to treat a doubled noun as an adverb diff --git a/src/lib/src/parsing/parse-vp.test.ts b/src/lib/src/parsing/parse-vp.test.ts index e92a61f..9d9faef 100644 --- a/src/lib/src/parsing/parse-vp.test.ts +++ b/src/lib/src/parsing/parse-vp.test.ts @@ -949,6 +949,11 @@ const tests: { }) ), }, + { + input: "سړي مې واهه", + output: [], + error: true, + }, ], }, { diff --git a/src/lib/src/parsing/parse-vp.ts b/src/lib/src/parsing/parse-vp.ts index 741e893..e3043ca 100644 --- a/src/lib/src/parsing/parse-vp.ts +++ b/src/lib/src/parsing/parse-vp.ts @@ -298,12 +298,23 @@ export function parseVP( }); } } - } else if (np.inflected) { - errors.push({ - message: !isPast - ? "object of a past tense transitive verb should not be inflected" - : "subject of a non-past tense transitive verb should not be inflected", - }); + } else { + if (np.inflected) { + errors.push({ + message: !isPast + ? "object of a past tense transitive verb should not be inflected" + : "subject of a non-past tense transitive verb should not be inflected", + }); + } + if (getPersonFromNP(king) !== verb.person) { + errors.push({ + message: `${ + isPast ? "past tense" : "non-past tense" + } transitive verb must agree agree with ${ + isPast ? "obect" : "subject" + }`, + }); + } } const blocksOps: T.VPSBlockComplete[][] = servants.map((servant) => !isPast