lib/rules/pragma-on-top.js
function inspectProgram(emitted) {
            let node = emitted.node, body = node.body;

            if (!emitted.exit || missingNodeOnTopErrorReported) {
                return;
            }

            (body.length > 0) && (body [0].type !== "PragmaStatement") && context.report({
                node: node,
                message: "No Pragma directive found at the top of file."
            });
        }
function inspectProgram(emitted) {
            let node = emitted.node, body = node.body;

            if (!emitted.exit || missingNodeOnTopErrorReported) {
                return;
            }

            (body.length > 0) && (body [0].type !== "PragmaStatement") && context.report({
                node: node,
                message: "No Pragma directive found at the top of file."
            });
        }
This executes only when we're leaving the Program node. At that time,
we check whether the "missing pragma on top" error has already been reported or not.
If not, we proceed to report it here. This happens when there are no pragma statements in
the entire file. If there is one (but not on top of file), it gets reported by inspectPragmaStatement().
NOTE: A Pragma dir must exist at absolute top, even before pragma experimental.