Skip to content

Commit 2f0633f

Browse files
authored
Update switch.ts (Imports and Spacing)
1. Fixed tab-size to 2 from 4 spaces. 2. Add Import Statements for `./classes/SwitchContext` and `./classes/SwitchManager`
1 parent 0fb41a8 commit 2f0633f

1 file changed

Lines changed: 43 additions & 42 deletions

File tree

switch.ts

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,50 @@
1-
1+
import {SwitchContext} from './classes/SwitchContext'
2+
import {SwitchManager} from './classes/SwitchManager'
23

34

45
namespace switchcase {
56

6-
/**
7-
* Switch Block Container
8-
*/
9-
//% block="switch $value"
10-
//% blockId=switchcase_switch_block
11-
//% group="Control"
12-
//% weight=100
13-
//% draggableParameters
14-
export function switchBlock(value: any): void {
15-
//this is jut a container; actual logic is in codegen
16-
//Placeholder for CodeGen
17-
}
18-
19-
/**
20-
* Case Block Container
21-
*/
22-
/**********************
23-
//% block="case $match"
24-
//% blockId=switchcase_case_block
25-
//% group="Control"
26-
//% weight=90
27-
//% draggableParameters
28-
//% draggableStatement=true
29-
export function caseBlock(match: any): void {
30-
//Placeholder for CodeGen
31-
}
32-
*********************/
33-
34-
/**
35-
* Default-Case Block Container
36-
*/
37-
/**********************
38-
//% block="default case"
39-
//% blockId=switchcase_default_case_block
40-
//% group="Control"
41-
//% weight=80
42-
//% draggableStatement=true
43-
export function defaultCaseBlock(): void {
44-
//Placeholder for CodeGen
45-
}
46-
*********************/
7+
/**
8+
* Switch Block Container
9+
*/
10+
//% block="switch $value"
11+
//% blockId=switchcase_switch_block
12+
//% group="Control"
13+
//% weight=100
14+
//% draggableParameters
15+
export function switchBlock(value: any): void {
16+
//this is jut a container; actual logic is in codegen
17+
18+
}
19+
20+
/**
21+
* Case Block Container
22+
*/
23+
/**********************
24+
//% block="case $match"
25+
//% blockId=switchcase_case_block
26+
//% group="Control"
27+
//% weight=90
28+
//% draggableParameters
29+
//% draggableStatement=true
30+
export function caseBlock(match: any): void {
31+
//Placeholder for CodeGen
32+
}
33+
*********************/
34+
35+
/**
36+
* Default-Case Block Container
37+
*/
38+
/**********************
39+
//% block="default case"
40+
//% blockId=switchcase_default_case_block
41+
//% group="Control"
42+
//% weight=80
43+
//% draggableStatement=true
44+
export function defaultCaseBlock(): void {
45+
//Placeholder for CodeGen
46+
}
47+
*********************/
4748

4849

4950
}

0 commit comments

Comments
 (0)