Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic(ms-basic) highlight mode #5649

Merged
merged 4 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ace-modes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ declare module "ace-code/src/mode/autohotkey" {
export const Mode: new () => import(".").Ace.SyntaxMode;
}

declare module "ace-code/src/mode/basic_highlight_rules" {
export const BasicHighlightRules: new () => import(".").Ace.HighlightRules;
}

declare module "ace-code/src/mode/basic" {
export const Mode: new () => import(".").Ace.SyntaxMode;
}

declare module "ace-code/src/mode/batchfile_highlight_rules" {
export const BatchFileHighlightRules: new () => import(".").Ace.HighlightRules;
}
Expand Down Expand Up @@ -424,6 +432,10 @@ declare module "ace-code/src/mode/folding/asciidoc" {
export const FoldMode: new () => import(".").Ace.Folding;
}

declare module "ace-code/src/mode/folding/basic" {
export const FoldMode: new () => import(".").Ace.Folding;
}

declare module "ace-code/src/mode/folding/c9search" {
export const FoldMode: new () => import(".").Ace.Folding;
}
Expand Down
43 changes: 43 additions & 0 deletions demo/kitchen-sink/docs/basic.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
120 OPEN"R" #1 "INVEN.DAT",39
125 FIELD#1,1 AS F$,30 AS D$, 2 AS Q$,2 AS R$,4 AS PH
130 PRINT:PRINT "FUNCTIONS:":PRINT
135 PRINT 1,"INITIALIZE FILE"
140 PRINT 2 "CREATE A NEW ENTRY"
150 PRINT 3,"DISPLAY INVENTORY FOR ONE PART"
160 PRINT 4 "ADD TO STOCK"
170 PRINT 5,"SUBTRACT FROM STOCK"
180 PRINT 6,"DISPLAY ALL ITEMS BELOW REORDER LEVEL"
220 PRINT:PRINT:INPUT"FUNCTION";FUNCTION
225 IF (FUNCTION<1)OR(FUNCTION>6) THEN PRINT "BAD FUNCTION NUMBER":GOTO 130
230 ON FUNCTION GOSUB 900,250,390,480,560,680
240 GOTO 220
560 REM REMOVE FROM STOCK
570 GOSUB 840
580 IF ASC(F$)=255 THEN PRINT "NULL ENTRY":RETURN
590 PRINT DH
600 INPUT "QUANTITY TO SUBTRACT";S%
610 Q%=CVI(Q$)
620 IF (Q%-S%)<0 THEN PRINT "ONIY";Q%; "IN STOCK":GOTO 600
630 Q%=Q%-S%
640 IF Q%=<CVT(R$) THEN PRINT "QUANTITY NOW";Q%;
44 REORDER LEVEL";CVI(RH)
LSET Q$=MKU(Q%)
PUT#1,PART%
RETURN
DISPLAY ITEMS BELOW REORDER LEVEL
FOR 1=1 TO 100
GET#1J
IF OVI(tzH)OVI(RH) THEN PRINT Dtz;" QUANTITY";
OVI(Qtz) TAB(50) "REORDER LEVEL";CVI(R$)
NEXT I
RETURN
INPUT "PART NUMBER";PART%
IF(PART%<1)OR(PART%>100) THEN PRINT "BAD PART NUMBER": GOTO 840 ELSE GET#1 J>ART%:RETURN
END
REM INITIALIZE FILE
INPUT "ARE YOU SURE";B$:IF B$<="Y" THEN RETURN
LSET F$=CHR$(255)
FOR O=1 TO 100
PUT#1J
NEXT I
RETURN
1 change: 1 addition & 0 deletions src/ext/modelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ var supportedModes = {
Astro: ["astro"],
AutoHotKey: ["ahk"],
BatchFile: ["bat|cmd"],
Basic: ["bas|bak"],
BibTeX: ["bib"],
C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
C9Search: ["c9search_results"],
Expand Down
Loading
Loading