Tal Leming shared a really good frac feature script a while ago. It basically allow you to just select all the text, enable the frac feature, and everything is handled correctly. No need to manually seacrh fractions and mark them as such.
His script can be found here: http://talleming.com/2009/10/01/fraction-fever-2/
The only pitfal for using it in glyphs is that he requires a thinspace. Either you could generate it automatically, when the frac feature is used;
Alternatively you could exchange the last line with “pos @figures’ -200 space @numerators;”, but that might be more obscure to edit, and there’s no value that will fit all.