How to substitute a character with a diacritic only when it's preceded by an another character?

I’m making a font for my conscript, where vowels can be represented either by symbols or diacritics I’ve made some ligatures for syllables.
FontCreator_FtcbP7jfPY.png
Symbol and diacritic on the left is for vowel a, while on the right is for vowel e.
I want to make a substitution rule, where the vowel symbols would turn into diacritics only when they’re preceded by a syllable (e.g. pa (syllable) + a (symbol) = paa (syllable + diacritic). I tried doing this with single and multiple substitutions, but it affects even isolated and initial states of these symbols, I don’t want that.
FontCreator_JmyYlv8S3w.png
FontCreator_ElZlPIVtSt.png
Such symbols should turn into diacritics only once and only if they’re preceded by a syllable.
FontCreator_nPo9L6CmSk.png
FontCreator_PKXdW8rlJ5.png
Currently, it looks like this (screenshot above).

You will need a contextual lookup. See the Swashes for an example:

Enrich Your Fonts with OpenType Features