From 4b6eb100b3301d09a3302ee5bc804a0a9daca518 Mon Sep 17 00:00:00 2001 From: Martin Huschenbett Date: Fri, 11 Oct 2024 09:20:51 +0200 Subject: [PATCH] Updates --- assets/{index-AxP04blE.js => index-DUkB02vA.js} | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename assets/{index-AxP04blE.js => index-DUkB02vA.js} (99%) diff --git a/assets/index-AxP04blE.js b/assets/index-DUkB02vA.js similarity index 99% rename from assets/index-AxP04blE.js rename to assets/index-DUkB02vA.js index bf121c4..734c6ce 100644 --- a/assets/index-AxP04blE.js +++ b/assets/index-DUkB02vA.js @@ -1342,4 +1342,4 @@ fn fib_tailrec(n) { go(n); a } -`;function zk(){const[e,t]=W.useState("parser"),[n,r]=yb(Dk,200),[h,i]=W.useState(),[d,g]=W.useState([]),[u,p]=W.useState(),s=W.useRef(null),[o,a]=W.useState(null),[l,c]=W.useState(null);W.useEffect(function(){const{problems:m,syntax:v}=oS(n,{include_trivia:!1});g(m),p(v)},[n]);const f=W.useCallback(function(m){var w;if(s.current===null){console.warn("Editor not yet loaded.");return}const v=(w=s.current)==null?void 0:w.editor,{line:y,column:$}=m.start;v.gotoLine(y+1,$,!0),v.focus()},[]);return V.jsxs("div",{className:Ek,children:[V.jsxs("div",{className:Tk,children:[V.jsx("div",{className:Rk,children:V.jsx(wk,{aceRef:s,program:n,setProgram:r,setCursor:i,problems:d,hoveredSyntax:o,cursedSyntax:l})}),V.jsx("div",{className:Ik,children:V.jsxs(xt,{className:Nk,value:e,onChange:t,inverted:!0,children:[V.jsx(xt.Panel,{value:"parser",flex:"1 1 0",mih:0,children:V.jsx(Lk,{syntax:u,cursor:h,setHoveredSyntax:a,setCursedSyntax:c})}),V.jsx(xt.Panel,{value:"checker",flex:1,children:"Panel for the intermediate representation produced by the type checker."}),V.jsx(xt.Panel,{value:"interpreter",flex:1,children:"Panel for the value produced by the interpreter."}),V.jsxs(xt.List,{children:[V.jsx(xt.Tab,{value:"parser",children:"Parser"}),V.jsx(xt.Tab,{value:"checker",children:"Type checker"}),V.jsx(xt.Tab,{value:"interpreter",children:"Interpreter"})]})]})})]}),V.jsx("div",{className:Ok,children:V.jsx($k,{problems:d,onSelect:f})})]})}function Fk(){const{fullscreen:e,toggle:t}=Ib();return V.jsx(mg,{theme:Mm,children:V.jsxs(St,{header:{height:64},footer:{height:32},navbar:{width:240,breakpoint:"sm"},children:[V.jsx(St.Header,{children:V.jsxs(fo,{h:"100%",px:"md",c:"white",bg:mn.colors.blue.filled,justify:"space-between",children:[V.jsxs(la,{children:[V.jsxs("span",{style:{fontSize:K(32),fontWeight:700,fontFamily:mn.fontFamilyMonospace},children:["felix"," "]}),"Playground for compiler frontend and programming language experiments."]}),V.jsxs(fo,{gap:"sm",children:[V.jsx(oi,{color:"white",size:"md",component:"a",href:"https://github.com/hurryabit/felix",children:V.jsx(S0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5})}),V.jsx(oi,{color:"white",size:"md",onClick:()=>alert("Soon!"),children:V.jsx(x0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5})}),V.jsx(oi,{color:"white",size:"md",onClick:t,children:e?V.jsx(w0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5}):V.jsx(b0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5})})]})]})}),V.jsx(St.Footer,{children:V.jsx(Lu,{h:"100%",w:"100%",bg:mn.colors.blue.filled,c:"white",children:V.jsxs(la,{children:["\xA9 2024"," ",V.jsx("a",{href:"https://github.com/hurryabit/",style:{color:"white"},children:"Martin Huschenbett"})]})})}),V.jsx(St.Navbar,{}),V.jsx(St.Main,{h:"100dvh",children:V.jsx(zk,{})})]})})}Oa.createRoot(document.getElementById("root")).render(V.jsx(Sh.StrictMode,{children:V.jsx(Fk,{})}))})()});export default D$(); +`;function zk(){const[e,t]=W.useState("parser"),[n,r]=yb(Dk,20),[h,i]=W.useState(),[d,g]=W.useState([]),[u,p]=W.useState(),s=W.useRef(null),[o,a]=W.useState(null),[l,c]=W.useState(null);W.useEffect(function(){const m=performance.now(),{problems:v,syntax:y}=oS(n,{include_trivia:!1}),$=performance.now();console.debug(`Parsing took ${Math.ceil($-m)} ms.`),g(v),p(y)},[n]);const f=W.useCallback(function(m){var w;if(s.current===null){console.warn("Editor not yet loaded.");return}const v=(w=s.current)==null?void 0:w.editor,{line:y,column:$}=m.start;v.gotoLine(y+1,$,!0),v.focus()},[]);return V.jsxs("div",{className:Ek,children:[V.jsxs("div",{className:Tk,children:[V.jsx("div",{className:Rk,children:V.jsx(wk,{aceRef:s,program:n,setProgram:r,setCursor:i,problems:d,hoveredSyntax:o,cursedSyntax:l})}),V.jsx("div",{className:Ik,children:V.jsxs(xt,{className:Nk,value:e,onChange:t,inverted:!0,children:[V.jsx(xt.Panel,{value:"parser",flex:"1 1 0",mih:0,children:V.jsx(Lk,{syntax:u,cursor:h,setHoveredSyntax:a,setCursedSyntax:c})}),V.jsx(xt.Panel,{value:"checker",flex:1,children:"Panel for the intermediate representation produced by the type checker."}),V.jsx(xt.Panel,{value:"interpreter",flex:1,children:"Panel for the value produced by the interpreter."}),V.jsxs(xt.List,{children:[V.jsx(xt.Tab,{value:"parser",children:"Parser"}),V.jsx(xt.Tab,{value:"checker",children:"Type checker"}),V.jsx(xt.Tab,{value:"interpreter",children:"Interpreter"})]})]})})]}),V.jsx("div",{className:Ok,children:V.jsx($k,{problems:d,onSelect:f})})]})}function Fk(){const{fullscreen:e,toggle:t}=Ib();return V.jsx(mg,{theme:Mm,children:V.jsxs(St,{header:{height:64},footer:{height:32},navbar:{width:240,breakpoint:"sm"},children:[V.jsx(St.Header,{children:V.jsxs(fo,{h:"100%",px:"md",c:"white",bg:mn.colors.blue.filled,justify:"space-between",children:[V.jsxs(la,{children:[V.jsxs("span",{style:{fontSize:K(32),fontWeight:700,fontFamily:mn.fontFamilyMonospace},children:["felix"," "]}),"Playground for compiler frontend and programming language experiments."]}),V.jsxs(fo,{gap:"sm",children:[V.jsx(oi,{color:"white",size:"md",component:"a",href:"https://github.com/hurryabit/felix",children:V.jsx(S0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5})}),V.jsx(oi,{color:"white",size:"md",onClick:()=>alert("Soon!"),children:V.jsx(x0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5})}),V.jsx(oi,{color:"white",size:"md",onClick:t,children:e?V.jsx(w0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5}):V.jsx(b0,{style:{width:"70%",height:"70%",color:mn.colors.blue.filled},stroke:1.5})})]})]})}),V.jsx(St.Footer,{children:V.jsx(Lu,{h:"100%",w:"100%",bg:mn.colors.blue.filled,c:"white",children:V.jsxs(la,{children:["\xA9 2024"," ",V.jsx("a",{href:"https://github.com/hurryabit/",style:{color:"white"},children:"Martin Huschenbett"})]})})}),V.jsx(St.Navbar,{}),V.jsx(St.Main,{h:"100dvh",children:V.jsx(zk,{})})]})})}Oa.createRoot(document.getElementById("root")).render(V.jsx(Sh.StrictMode,{children:V.jsx(Fk,{})}))})()});export default D$(); diff --git a/index.html b/index.html index 3235532..e55be72 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ content="minimum-scale=1, initial-scale=1, width=device-width, user-scalable=no" /> felix - +