File tree 4 files changed +9
-16
lines changed
4 files changed +9
-16
lines changed Original file line number Diff line number Diff line change 1
- # Plays the `Music` song with a shuffled melody
2
- &ast⋅(
3
- Music
4
- ♭↯2
5
- ▽1.2
6
- ⍜(⤸1 ≡(↘1⧈∘¤¤¯4) ⧈∘¤¤¯64)≡°⍆
7
- ÷⟜⧈/+5
8
- )
Original file line number Diff line number Diff line change @@ -2369,19 +2369,20 @@ impl Compiler {
2369
2369
where
2370
2370
S : ToString ,
2371
2371
{
2372
+ if !self . allow_experimental ( ) {
2373
+ self . scope . experimental_error = true ;
2374
+ self . add_error ( span. clone ( ) , message ( ) . to_string ( ) ) ;
2375
+ }
2376
+ }
2377
+ fn allow_experimental ( & self ) -> bool {
2372
2378
let take = self
2373
2379
. scopes ( )
2374
2380
. position ( |sc| matches ! ( sc. kind, ScopeKind :: File ( _) ) )
2375
2381
. map ( |i| i + 1 )
2376
2382
. unwrap_or ( usize:: MAX ) ;
2377
- if !self
2378
- . scopes ( )
2383
+ self . scopes ( )
2379
2384
. take ( take)
2380
2385
. any ( |sc| sc. experimental || sc. experimental_error )
2381
- {
2382
- self . scope . experimental_error = true ;
2383
- self . add_error ( span. clone ( ) , message ( ) . to_string ( ) ) ;
2384
- }
2385
2386
}
2386
2387
fn error ( & self , span : impl Into < Span > , message : impl ToString ) -> UiuaError {
2387
2388
UiuaErrorKind :: Run {
Original file line number Diff line number Diff line change @@ -846,7 +846,7 @@ impl Compiler {
846
846
SigNode :: new ( sig, node)
847
847
} ;
848
848
let span = self . add_span ( modified. modifier . span . clone ( ) ) ;
849
- let un = if self . scope . experimental {
849
+ let un = if self . allow_experimental ( ) {
850
850
if f. sig . args == f. sig . outputs {
851
851
let ( f_before, f_after) = f
852
852
. node
Original file line number Diff line number Diff line change 2
2
3
3
# 0.15
4
4
- Allow unnamed data def outside named module
5
- - Subscripts ` bits `
5
+ - Subscripted ` bits `
6
6
- Non-dyadic ` backward `
7
7
- 0-output ` tuples `
8
8
- Implement some ` under ` inverses in terms of ` un by ` , rather than the other way around
You can’t perform that action at this time.
0 commit comments