All files / src/abap/2_statements/statements scan.ts

100% Statements 27/27
100% Branches 0/0
100% Functions 1/1
100% Lines 27/27

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71  1x 1x 1x     1x     20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x   20x                                                                       20x      
import {IStatement} from "./_statement";
import {verNot, seq, per} from "../combi";
import {Target, Source} from "../expressions";
import {Version} from "../../../version";
import {IStatementRunnable} from "../statement_runnable";
 
export class Scan implements IStatement {
 
  public getMatcher(): IStatementRunnable {
    const tokens = seq("TOKENS INTO", Target);
    const word = seq("WORD INTO", Target);
    const line = seq("LINE INTO", Target);
    const statements = seq("STATEMENTS INTO", Target);
    const levels = seq("LEVELS INTO", Target);
    const structures = seq("STRUCTURES INTO", Target);
    const include = seq("INCLUDE INTO", Target);
    const offset = seq("OFFSET INTO", Target);
    const enh = seq("ENHANCEMENTS INTO", Target);
    const enhO = seq("ENHANCEMENT OPTIONS INTO", Target);
    const keywords = seq("KEYWORDS FROM", Source);
    const pragmas = seq("WITH PRAGMAS", Source);
    const overflow = seq("OVERFLOW INTO", Target);
    const message = seq("MESSAGE INTO", Target);
    const includeProgram = seq("INCLUDE PROGRAM FROM", Source);
    const frame = seq("FRAME PROGRAM FROM", Source);
    const program = seq("PROGRAM FROM", Source);
    const from = seq("FROM", Source);
    const to = seq("TO", Source);
    const replacing = seq("REPLACING", Source);
    const id = seq("ID", Source, "TABLE", Source);
 
    const ret = seq("SCAN ABAP-SOURCE",
                    Source,
                    per(tokens,
                        levels,
                        from,
                        to,
                        statements,
                        structures,
                        keywords,
                        word,
                        line,
                        offset,
                        overflow,
                        message,
                        includeProgram,
                        include,
                        frame,
                        enhO,
                        enh,
                        program,
                        replacing,
                        "WITH ANALYSIS",
                        "WITH COMMENTS",
                        "WITH TYPE-POOLS",
                        "WITH INCLUDES",
                        "WITHOUT TRMAC",
                        "WITH DECLARATIONS",
                        "WITH BLOCKS",
                        "PRESERVING IDENTIFIER ESCAPING",
                        "WITH LIST TOKENIZATION",
                        "WITH EXPLICIT ENHANCEMENTS",
                        "WITH IMPLICIT ENHANCEMENTS",
                        "WITH INACTIVE ENHANCEMENTS",
                        pragmas,
                        id));
 
    return verNot(Version.Cloud, ret);
  }
 
}