Top 1,000 Features Creators Resources Blog Explorer Download
GitHub icon

Semantic Indentation

< >
Example from 1 languages: Python
class Person (object): def __init__(self, name): self.name = name
Example from 1 languages: PureScript
-- https://github.com/purescript/documentation/blob/master/language/Syntax.md -- Syntax is whitespace sensitive. The general rule of thumb is that declarations which span multiple lines should be indented past the column on which they were first defined on their subsequent lines. foo = bar + baz
Example from 1 languages: Tree Notation
example title Tree Notation
Example from 1 languages: Scroll
* A link to PLDB https://pldb.io
Example from 1 languages: Cirru
print + 1 2 , 11
Example from 1 languages: Z
defun message msg do print : Here's a message print msg print : End of message.
Example from 1 languages: Speedie
class Person |string| name
Example from 2 languages: Note, Space
settings title Note
Example from 1 languages: Sheep
define pythtree ax:real ay:real bx:real by:real depth:int do cx = ax-ay+by end
*

Languages with Semantic Indentation include Python, Haskell, CoffeeScript, Nim, YAML, Markdown, Elm, F#, Pug, PureScript, HAML, Sass, Makefile, reStructuredText, Literate CoffeeScript, Imba, wisp, Boo, Nemerle, SCSS, Org, Stylus, Inform, Tree Notation, XL, LiveScript, ABC, Cobra, Argdown, Scroll, Occam, Genie, Curry, Cyber, Miranda, bog, Spin, Cirru, Z, Ohayo, ISWIM, Aldor, Speedie, ELFE, PROMAL, Quaint, BuddyScript, TQL, Note, Space, p4p, beads-lang, Sweet Expressions, Truth, Sheep, Indental, noon, net-format, mckeeman-form, MADCAP VI, CSL, I-expressions, Ordered graph data language, converge, MADCAP, bml

*

Languages without Semantic Indentation include JavaScript, C, Java, HTML, Perl, CSS, Ruby, PHP, Go, JSON, TypeScript, XML, SQL, C#, R, Bash, PowerShell, Swift, Rust, Scala, Lua, MATLAB, Kotlin, Clojure, Elixir, Objective-C, Julia, SAS, Erlang, Prolog, Mathematica, COBOL, Dart, CUDA, Solidity, Visual Basic, Pascal, Ada, Fortran, PostgreSQL, Racket, TOML, Crystal, Reason, MySQL, D, Scheme, Haxe, GraphQL, Groovy, awk, Tex, OCaml, Chapel, SPSS, LLVM IR, Smalltalk, VHDL, HCL, Idris, SVG, Protocol Buffers, Forth, Visual Basic .NET, Ini, Deno, APL, JSON5, Yacc, ARM, LaTeX, OpenCL, J, Red, fish, Maple, Embedded Crystal, ANTLR, odin, Delphi, Standard ML, IDL, V, Stata, ABAP, Verilog, Tcl, PostCSS, FLUX, BASIC, ActionScript, Hy, starlark, Dhall, KaTeX, Ballerina, AutoHotkey, Fennel, Factor, PostScript, Squirrel, Wren, Common Lisp, ColdFusion, API Blueprint, XQuery, Eiffel, PEG.js, Smali, MoonScript, MUMPS, Flow, VBScript, Zephir, EDN, Frege, DOT, NetLogo, Nginx, Logo, Pig Latin, carp, PL/SQL, GNU Octave, Koka, Vala, M4, Lex, Terra, Opa, QML, C3, Jsonnet, Eve, Halide, PRQL, Processing, Dafny, Nearley, mlir, Agda, PL/I, Emacs Lisp, Regular Expressions, Wolfram Language, Nextflow, Jison, Hack, Hjson, Ceylon, POV-Ray SDL, Applescript, AMPL, SystemVerilog, unison, Expect, DTrace, x86 Assembly, progsbase, Modula-2, YASnippet, GAP, ECL, Scilab, JAI, Click, Cue, Rexx, Oberon, Slope, AutoIt, AGC, Taichi, Golo, Simula, idyll, Transact-SQL, mgmt, ALGOL 60, Clean, WDL, eC, Sage, PowerBuilder, Felix, Mercury, Ron, BCPL, CWL, Ring, CIL, AspectJ, Mirah, SuperCollider, K, EBNF, Dylan, Perl 6, Datalog, Observable, Mu, Modula-3, Oz, Logica, Closure Templates, TLA, Xojo, Neko, B, Lily, REBOL, Modelica, Maxima, Bison, JCL, Self, xBase, ATS, CLIPS, SugarSS, Fancy, Io, JFlex, Isabelle, Fantom, NSIS, Xtend, datascript, Pike, Object Pascal, LFE, ArkScript, Befunge, Java Properties, X10, SourcePawn, NewLisp, LilyPond, Lasso, OpenSCAD, NCAR Command Language, Turing, Logtalk, P4, Csound, E, Icon, Whiley, PureBasic, PAWN, mun-lang, UrWeb, Cg, Filebench WML, Angelscript, JSON with Comments, Ch, Dockerfile, IGOR Pro, dlvm, Objective C++, Clipper, LiveCode, Java Bytecode, Limbo, JADE, Logos, Monkey, Gherkin, Euphoria, GDScript, lispyscript, SNOBOL, Objective-J, XSLT, Classroom Object Oriented Language, Ragel, Vigil, Alloy, spry, Harbour, dex, Praat Script, Ren'Py, PicoLisp, CIL, MQL5, Apex, Falcon, FreeBASIC, Pan, Mask, Volt, Concise Encoding, Netwide Assembler, OCL, Spatial, Guile, Augmented Backus-Naur Form, Tea, Croc, OX, C shell, Seed7, PL/M, popr, Script.NET, UNLAMBDA, Linden Scripting Language, Fortress, spiral, Not Quite C, Opal, neut, PARI/GP, Gentoo Ebuild, LPC, DM, RELAX NG, NetLinx, BitBake, NestedText, MAXScript, Jule, Bluespec, Game Maker Language, Eclipse Command Language, S-PLUS, Jasmin, Strips, Oberon-2, HOPE, Dc, SETL, Structured Query Reporter, BETA, Gambas, SMT, HiveQL, Cycript, Unicon, Slice, monte, WebIDL, XS, Rc, CIR, ldpl, LoomScript, Hocon, PIC, COMPONENT PASCAL, Lingo, Joy, storyscript, Sather, Vale, LotusScript, MiniD, Cell, Nymph, CartoCSS, dedukti, Grammatical Framework, Ezhil, LookML, Refal, Type Language, SRecode Template, RenderScript, Brightscript, Not eXactly C, Maya Embedded Language, Adventure Game Studio Script, gentee, ShaderLab, GCC Machine Description, Edje Data Collection, BLISS, HAGGIS, QB64, KRL, Charity, Orc, CLIST, MOO, Parser 3, Mouse, Action!, PowerBASIC, Frink, ARexx, kai, S-algol, KiXtart, Alpine Abuild, XBase++, NetRexx, silk, manool, OpenVera, Wart, MVEL, Raku, Project Mentat, tht, EuLisp, JS++, Heron, NS Basic, Mary, Yoix, Simple Actor Language System and Architecture, Lite-C, Yet Another Scripting Language, Plus, Fj枚lnir, Rescript, winxed, xxl, Judoscript, Language Server Index Format, neeilang, Bel, taf, carth, FutureBASIC, Rust MIR, Handel-C, VHDL-AMS, Tuple space, Xbasic, SIL, PowerQuery M, True BASIC, owen-lang, SimCode, OEM, Claro, blockml, S3, Pnuts, Ion, XPL0, MACRO-10, Ren, ISETL, ActiveVFP, Action Code Script, Fable, ProbeVue, omega, z80, blz, Recfiles, StarOffice Basic, CLOS, Operational Control Language, hilvl, False, Arden syntax, JCOF, ThinBasic, Zimpl, Guix Workflow Language, flagship, fizz, Atomese, JSL, stella, rosette-lang, Plot, epsilon, OptimJ, XBLite, holyc, Treelang, verifpal, lain, Parrot BASIC, FML, Fibonacci, Cach茅 Basic, Module Management System, WxBasic, luau, Bla, ArchieML, Soy, Reactive Plan Language, Literate Agda, Finite State Language, Turbo Basic, rbs, GraphQL Schema Definition Language, ca65 Assembly, Yedalog, SubX, StruQL, Manchester syntax, CFScript, ppm-format, Netpbm grayscale image format, Portable Bit Map Format, dslx, ctalk-lang, bioscript, Creative Basic, wescheme, txr, turnstile, ddfql, tremor-query, rbscript, zephyr-asdl, sora, WebAssembly Text Format

*

View all concepts with or missing a hasSemanticIndentation measurement

*

Read more about Semantic Indentation on the web: 1.

View source

- Build the next great programming language About Acknowledgements Extensions Day 630 Donate feedback@pldb.io