Well hello rufan - welcome to the forum.
There is so much wrong in that little snippet of code.
1) While syntax does not include the "then" keyword. "then" is part of the "if" statement.
2) Do not compare to false (or true) - it's bad form - in this case, use "not" instead.
3) even with these corrections, your loop will make constant calls to doSpinStop() whilst OEMTRIG1 is false. This is a BAD thing to do and will end in tears.
Perhaps you can describe what you'd like to achieve.