lambda-calculus/parse/position/new.c
2025-01-13 20:36:07 -06:00

31 lines
455 B
C

#include <debug.h>
#include <memory/smalloc.h>
#include <string/inc.h>
#include "struct.h"
#include "new.h"
struct position* new_position(
struct string* filename,
unsigned line,
unsigned column)
{
ENTER;
struct position* this = smalloc(sizeof(*this));
this->filename = inc_string(filename);
this->line = line;
this->column = column;
this->refcount = 1;
EXIT;
return this;
}