check verb agreement with 1 NP transitive phrases

This commit is contained in:
adueck 2023-08-31 13:41:06 +04:00
parent f59e3c6550
commit a3dbf550f0
3 changed files with 23 additions and 6 deletions

View File

@ -0,0 +1 @@
// TODO: ability to treat a doubled noun as an adverb

View File

@ -949,6 +949,11 @@ const tests: {
})
),
},
{
input: "سړي مې واهه",
output: [],
error: true,
},
],
},
{

View File

@ -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