Skip to content

Commit

Permalink
Add test file for fortran lexer.
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamatongwe committed Jan 10, 2024
1 parent c74c831 commit c99eff8
Show file tree
Hide file tree
Showing 4 changed files with 148 additions and 0 deletions.
47 changes: 47 additions & 0 deletions test/examples/fortran/AllStyles.f
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
! Enumerate all styles: 0 to 14
! This is not a viable source file, it just illustrates the different states in isolation.

! comment=1
! Comment

! default=0
! w

! number=2
.37

! string1=3
'string'

! string2=4
"string"

! stringeol=5
" unclosed
! operator=6
+
! identifier=7
variable
! word=8
program
! word2=9
system_clock
! word3=10
doublecomplex
! preprocessor=11
!DEC$ ATTRIBUTES DLLEXPORT::sr1
! operator2=12
.lt.
! label=13
999
! continuation=14
&
48 changes: 48 additions & 0 deletions test/examples/fortran/AllStyles.f.folded
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
0 400 0 ! Enumerate all styles: 0 to 14
0 400 0 ! This is not a viable source file, it just illustrates the different states in isolation.
1 400 0
0 400 0 ! comment=1
0 400 0 ! Comment
1 400 0
0 400 0 ! default=0
0 400 0 ! w
1 400 0
0 400 0 ! number=2
0 400 0 .37
1 400 0
0 400 0 ! string1=3
0 400 0 'string'
1 400 0
0 400 0 ! string2=4
0 400 0 "string"
1 400 0
0 400 0 ! stringeol=5
0 400 0 " unclosed
1 400 0
0 400 0 ! operator=6
0 400 0 +
1 400 0
0 400 0 ! identifier=7
0 400 0 variable
1 400 0
0 400 0 ! word=8
2 400 0 + program
1 401 0 |
0 401 0 | ! word2=9
0 401 0 | system_clock
1 401 0 |
0 401 0 | ! word3=10
0 401 0 | doublecomplex
1 401 0 |
0 401 0 | ! preprocessor=11
0 401 0 | !DEC$ ATTRIBUTES DLLEXPORT::sr1
1 401 0 |
0 401 0 | ! operator2=12
0 401 0 | .lt.
1 401 0 |
0 401 0 | ! label=13
0 401 0 | 999
1 401 0 |
0 401 0 | ! continuation=14
0 401 0 | &
0 400 0
47 changes: 47 additions & 0 deletions test/examples/fortran/AllStyles.f.styled
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{1}! Enumerate all styles: 0 to 14{0}
{1}! This is not a viable source file, it just illustrates the different states in isolation.{0}

{1}! comment=1{0}
{1}! Comment{0}

{1}! default=0{0}
{1}! w{0}

{1}! number=2{0}
{2}.37{0}

{1}! string1=3{0}
{3}'string'{0}

{1}! string2=4{0}
{4}"string"{0}

{1}! stringeol=5{0}
{5}" unclosed
{0}
{1}! operator=6{0}
{6}+{0}

{1}! identifier=7{0}
{7}variable{0}

{1}! word=8{0}
{8}program{0}

{1}! word2=9{0}
{9}system_clock{0}

{1}! word3=10{0}
{10}doublecomplex{0}

{1}! preprocessor=11{0}
{11}!DEC$ ATTRIBUTES DLLEXPORT::sr1{0}

{1}! operator2=12{0}
{12}.lt.{0}

{1}! label=13{0}
{13}999{0}

{1}! continuation=14{0}
{14}&{0}
6 changes: 6 additions & 0 deletions test/examples/fortran/SciTE.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
lexer.*.f=fortran
keywords.*.f=do end if program
keywords2.*.f=system_clock
keywords3.*.f=doublecomplex
fold=1
fold.compact=1

0 comments on commit c99eff8

Please sign in to comment.