ed

[hare] The standard editor
Log | Files | Refs | README

cursor.ha (264B)


      1 fn cur_linenum(buf: *buffer, args: arg...) void = {
      2 	if (len(args) == 0) {
      3 		abort("TODO");
      4 	};
      5 	
      6 //	const n = match (args[0]) {
      7 //		n: uint => yield n,
      8 //		* => abort("TODO"),
      9 //	};
     10 	const a = args[0];
     11 	const n = a: uint;
     12 	buf.cur.node = addr_linenum(buf, n);
     13 };