File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -65,17 +65,17 @@ const opt: hoverOptions = {
65
65
break
66
66
case " sd" :
67
67
label = l .args [0 ].toString ()
68
- deviceId = label
68
+ deviceId = env . getAlias ( label , true )
69
69
prop = l .args [1 ].toString ()
70
70
break
71
71
case " ld" :
72
72
label = l .args [1 ].toString ()
73
- deviceId = label
73
+ deviceId = env . getAlias ( label , true )
74
74
prop = l .args [2 ].toString ()
75
75
break
76
76
}
77
77
if (deviceId && prop ) {
78
- new_text = ` ${label }[${prop }] = ` + env .getDeviceProp (deviceId , prop )
78
+ new_text = ` ${label }[${prop }] = ` + env .getDeviceProp (deviceId . toString () , prop )
79
79
}
80
80
}
81
81
}
Original file line number Diff line number Diff line change @@ -47,6 +47,13 @@ class Env extends DevEnv<{ update: () => void; update_code: () => void }> {
47
47
this . preAlias . set ( l ?. args [ 0 ] ?. toString ( ) , l ?. args [ 1 ] )
48
48
}
49
49
} )
50
+ this . lines
51
+ . filter ( ( l ) => l ?. fn === "define" )
52
+ . forEach ( ( l ) => {
53
+ if ( l ?. args [ 0 ] && l ?. args [ 1 ] ) {
54
+ this . preAlias . set ( l ?. args [ 0 ] ?. toString ( ) , Number ( l ?. args [ 1 ] ) )
55
+ }
56
+ } )
50
57
this . emit ( "update" )
51
58
}
52
59
You can’t perform that action at this time.
0 commit comments